46280c9e59
* Add functionality for updating SPV node bloom filter * Add SPV node shutdown to exit hook * Clean up traits/case classes * Change fixture in WalletBloomTest * Fix logging bug in TransactionProcessing * Add MerkleBuffers In this commit we add MerkleBuffers, which is an object that lets us aggreagate merkleblocks with their corresponding transactions before sending them out. This is global, mutable state (bad!) but it's a working solution for now; * Use TestAsyncUtil * Add MerkleBuffers test * Send getdata if receiving single header * Change awaitSync to use block count * Fix UpdateBloomFilterTest * Add more logging of chain/headers validation * Send getdata for all blocks * Nits: Scaladocs, comments toString |
||
---|---|---|
.. | ||
src | ||
README.md |
Philosphy of testkit
The high level of of the bitcoin-s testkit is to mimic provide functionality to test 3rd party applications.
There are other examples of these in the Scala ecosystem like the akka-testkit
and slick-testkit
.
We use this testkit to test bitcoin-s it self. For instance, our BitcoindRpcClient is tested with the functionality provided in the testkit. A quick example of a useful utility method is BitcoindRpcTestUtil.startedBitcoindRpcClient(). This spins up a bitcoind regtest instance on machine and generates 101 blocks on that node. This gives you the abililty to start spending money immediately with that bitcoind node.
We have similar utility methods for eclair.
Property based testing
There is also a robust set of generators available in the org.bitcoins.testkit.gen package. This allows you to integrate property based testing into your library and feel confident about implementing your application specific logic correctly.
You can see examples of us using these generators inside of testkit in our Private Key test cases