That helps a lot. Right now puzzling out how to get a peer added but at least I am looking at stuff that is relevant. Thanks.
// current prototype in the Kotlin programming language val networkParameters = TestNet3Params.get() val fullStoreDepth = 10 // let's just start with the first 10 blocks val blockStore = MemoryFullPrunedBlockStore(networkParameters, fullStoreDepth) val chain = FullPrunedBlockChain(networkParameters, blockStore) val peerGroup = PeerGroup(networkParameters, chain) val dnsDiscovery = DnsDiscovery(networkParameters) peerGroup.addPeerDiscovery(dnsDiscovery); // I expected this to add the peers automatically, must be missing something peerGroup.start() peerGroup.downloadBlockChain() // looks like this just waits for a peer to show up println(blockStore.chainHeadHeight) println(peerGroup.connectedPeers.size) On Sunday, November 21, 2021 at 1:36:18 AM UTC-8 Andreas Schildbach wrote: > There are a few examples and tools that operate with the protocol > directly, without any wallet. > > Classes to look at are Peer and PeerGroup, and the entire Message > hierarchy. > > > > On 21/11/2021 09.46, Sean Shubin wrote: > > Just started looking at bitcoinj. I am familiar with the bitcoin data > > structure, and want to write applications that analyze the blockchain > > data, so I am looking for a library that lets me interact with the > > bitcoin protocol directly. Does bitcoinj have that capability or is it > > only a higher level library for managing wallets? For my first > > prototype I intend to load the first 5000 blocks and compute for myself > > how many satoshi’s are at each address. I have already found the > > getGenesisBlock method on the NetworkParameters class, but am having > > trouble finding out how to get the next block without creating a > > WalletAppKit and loading the previous 2,104,841 blocks off the test net > > from the BlockStore. That seems like the wrong direction. I am hoping > > someone already familiar with bitcoinj can point me in the right > > direction regarding which classes I should be looking at first, without > > all the noise of capabilities I don’t need at the moment. > > > > > > -- > > You received this message because you are subscribed to the Google > > Groups "bitcoinj" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to [email protected] > > <mailto:[email protected]>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/bitcoinj/8a68259c-df2b-4e6f-956d-76929a61d5a9n%40googlegroups.com > > > < > https://groups.google.com/d/msgid/bitcoinj/8a68259c-df2b-4e6f-956d-76929a61d5a9n%40googlegroups.com?utm_medium=email&utm_source=footer > >. > -- You received this message because you are subscribed to the Google Groups "bitcoinj" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/bitcoinj/78c8d281-0ff1-48fe-b59a-90d3660369b8n%40googlegroups.com.
