2
2
What are differences between MemoryBlockStore and SPVBlockStore in bitcoinj?
Which should be used for downloading the blockchain and why?
Can I use same SPVChain format file for all wallets?
2
2
What are differences between MemoryBlockStore and SPVBlockStore in bitcoinj?
Which should be used for downloading the blockchain and why?
Can I use same SPVChain format file for all wallets?
2
MemoryBlockStore keeps StoredBlocks in memory and it is used primarily for unit testing.
Whereas SPVBlockStore holds a limited number of block headers in a memory mapped ring buffer. With such a store, you may not be able to process very deep re-orgs and could be disconnected from the chain (requiring a replay), but as they are virtually unheard of this is not a significant risk. You can find the reference document from the following link:
MemoryBlockStore https://bitcoinj.github.io/javadoc/0.12/org/bitcoinj/store/MemoryBlockStore.html
SPVBlockStore https://bitcoinj.github.io/javadoc/0.12/org/bitcoinj/store/SPVBlockStore.html