Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Only act on confirmed spends #1531
This PR removes the option to register spend notifications that will be triggered on spends detected in the mempool. This is done to ensure unified behavior across all backends, as they don't necessarily (most notably Neutrino) have a mempool.
This is a step in enabling integration tests also with
The commits are linearly ordered in such a way that one–by–one spend registration is changed over from a mempool spend to a confirmed spend, accompanied by any test changes that are needed to make them pass. This means that any commit that doesn't have a corresponding test change, should pass the tests without additional changes.
Finally we remove the option for mempool spends altogether, when all usages are eliminated.
Integration test changes
The most notable test change is modifications to
Nice! Looking forward to finally removing mempool dispatching all together! There're a few areas where I think we may still want to allow the callers to still dispatch based on confirmations.
For the record: we discussed the reason for mining +1 blocks during tests, and this is because the UTXO nursery broadcasts the transaction one block after it is actually first valid. We decided to keep this as is, since it doesn't really matter and many of the tests are written with this in mind. I modified my tests to match the patter: mine a block that includes the CSV locked tx, then mine