Open LLFourn opened 2 years ago
Ideally it would also be fast. We're running tests against regtest nodes, and our main issue is that it's very slow.
Happy to mentor someone on this issue if anyone wants to have a shot. It looks like fun!
See my comment here: https://github.com/bitcoindevkit/bdk/issues/690#issuecomment-1201471031
TL;DR Maybe we should implement a dummy RPC server instead of a dummy bdk::blockchain::Blockchain
?
Where we would use this backend, btw? In src/testutils/blockchain_tests.rs
, I suppose?
TL;DR Maybe we should implement a dummy RPC server instead of a dummy bdk::blockchain::Blockchain?
Eh, to me it looks more though to implement a dummy RPC server, but I don't really know...
One thing I was wondering was, for this to work, we need to mock a considerable portion of bitcoin core's mempool and other behaviors too, if we wanna use it for any meaningful testing situation.. Not sure how difficult or worthwhile its gonna be..
@vladimirfomene as we discussed on discord, with the new 1.0 bdk electrum/esplora/rpc clients it's worth taking another look at using a mocking framework instead of or in addition to our current integration tests. One framework that looks like it could do the job is https://docs.rs/mockall/latest/mockall/.
Moved to beta release since this is a testing issue. Due to level of work to do this may have to push it out to a post 1.0 release.
Rather than running a regtest node it would be cool if we just had a simulated blockchain that we could do things to from test code.
idea originally from: https://github.com/bitcoindevkit/bdk/issues/446