This comes with nice benefits:
- Less code and complexity
- Test can be run without wallet compiled in
Also add some additional checks for getmempoolentry (#22209) and other cleanups :art:
This comes with nice benefits:
Also add some additional checks for getmempoolentry (#22209) and other cleanups :art:
Concept ACK
Not strictly related to this PR, but: the parameter locktime is currently unused in send_self_transfer, i.e. it is not passed on to create_self_transfer. Now that this part is touched in this PR, this could also be addressed (e.g. in the first commit).
This is already done by the test framework in setup_nodes()
Can be reviewed with --ignore-all-space
576 | - # Send tx from which to conflict outputs later 577 | - base_txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), Decimal("10")) 578 | - self.nodes[0].generate(1) 579 | - self.sync_blocks() 580 | + wallet = MiniWallet(self.nodes[0]) 581 | + wallet.scan_blocks(start=76, num=1)
Where does the hardcoded 76 come from? It seems to me you just need a mature utxo here? If that's the case and I'm not missing anything, could you do something like: start=blockheight - COINBASE_MATURITY?
80 | @@ -78,10 +81,7 @@ def skip_test_if_missing_module(self):
81 | self.skip_if_no_wallet()
Did you forget to remove this now that the test can be run without the wallet compiled?
Can it?
Nope 👍
666 | # BIP 125 : 667 | # 1. The original transactions signal replaceability explicitly or through inheritance as described in the above 668 | # Summary section. 669 | - # The original transaction (`optout_child_tx`) doesn't signal RBF but its parent (`optin_parent_txid`) does. 670 | + # The original transaction (`optout_child_tx`) doesn't signal RBF but its parent (`optin_parent_tx`) does. 671 | # The replacement transaction (`replacement_child_tx`) should be able to replace the original transaction.
Is my understanding here correct?
a) testmempoolaccept returns that replacement_child_tx is allowed even though it is rejected w/ 'txn-mempool-conflict'
b) getmempoolentry returns that optout_child_tx is 'bip125-replaceable' - as you descbribe in #22209 even though it is not
So does anything need to be done to fix a and b?
Another question I have (which maybe I should just try out). But, I wonder what would happen if you tried something like https://github.com/bitcoin/bitcoin/pull/22210/files#diff-260c479178e3e99a16798aeed39f400676894392864784eda6c207716704398dR584-R589 after optout_child_tx was already sent
a) No, it is also rejected by testmempoolaccept, see mempool_valid=False for replacement_child_tx above.
b) correct
So does anything need to be done to fix a and b?
Maybe. But a fix should be done outside a test-only change.
Concept ACK: MiniWallet good
Tested ACK fa7d71f270b89c9d06230d4ff262646f9ea29f4a thanks for the explanations, nicely done
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
FromHex helper for msg serialization from hex, remove ToHex helper by theStack)If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
ACK fa7d71f270b89c9d06230d4ff262646f9ea29f4a 🍷
Follow-up idea based on discussion #22210 (review): This will probably not the last test that needs the block number of the first output to ADDRESS_BCRT1_P2WSH_OP_TRUE (i.e. suitable for MiniWallet in its default mode of MiniWalletMode.ADDRESS_OP_TRUE). In the future it may makes sense to put the magic number 76 into a constant.