rust-teos
rust-teos copied to clipboard
refactor(tests): Hide bitcoind stopper
We had to assign the stopper to a variable in the tests so to have it dropped at the end of the test and clean up the spawned mock server.
This refactor makes it so that the stopper is stored in Carrier (but only on test mode) and it's dropped whenever the carrier is dropped. I chose to include it in the carrier since the carrier is the struct that talks with bitcoind, so if the carrier is to die so should bitcoind as well.