* Split wallet functionality into multiple traits In this commit we refactor LockedWallet into multiple traits that provide functionality related to a subset of total wallet functionality. This has the benefit of making it clear which methods are helper methods that are only intended to be used in a very specific setting, and which methods are part of the internal wallet API that other parts of the wallet can use. * Rework TransactionOutput and TransactionOutPoint to case classes * Add extension methods for flattening lists of assertions * Segregate confirmed and unconfirmed balance methods * Add test for FutureUtil.sequentially * Add trace logging of balance fetching * Process outgoing TXOs Move TX processing into separate trait, add internal API method Unify DB representation of TXOs Prior to this commit we stored TXO information across diferent tables, with joins and tuples needed a bunch of places to keep track of everything we needed. In this commit we unify the tables, leaving us with only one table for TXOs. |
||
---|---|---|
.. | ||
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