mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge a926d6dfd2 into merged_master (Bitcoin PR bitcoin/bitcoin#22310)
This commit is contained in:
commit
dbd482d595
1 changed files with 13 additions and 0 deletions
|
|
@ -129,6 +129,9 @@ class ReplaceByFeeTest(BitcoinTestFramework):
|
|||
self.log.info("Running test no inherited signaling...")
|
||||
self.test_no_inherited_signaling()
|
||||
|
||||
self.log.info("Running test replacement relay fee...")
|
||||
self.test_replacement_relay_fee()
|
||||
|
||||
self.log.info("Passed")
|
||||
|
||||
def test_simple_doublespend(self):
|
||||
|
|
@ -641,6 +644,16 @@ class ReplaceByFeeTest(BitcoinTestFramework):
|
|||
assert_equal(True, self.nodes[0].getmempoolentry(optin_parent_tx['txid'])['bip125-replaceable'])
|
||||
assert_raises_rpc_error(-26, 'txn-mempool-conflict', self.nodes[0].sendrawtransaction, replacement_child_tx["hex"], 0)
|
||||
|
||||
def test_replacement_relay_fee(self):
|
||||
wallet = MiniWallet(self.nodes[0])
|
||||
wallet.scan_blocks(start=77, num=1)
|
||||
tx = wallet.send_self_transfer(from_node=self.nodes[0])['tx']
|
||||
|
||||
# Higher fee, higher feerate, different txid, but the replacement does not provide a relay
|
||||
# fee conforming to node's `incrementalrelayfee` policy of 1000 sat per KB.
|
||||
tx.vout[0].nValue = CTxOutValue(tx.vout[0].nValue.getAmount() - 1)
|
||||
tx.vout[1].nValue = CTxOutValue(tx.vout[1].nValue.getAmount() + 1)
|
||||
assert_raises_rpc_error(-26, "insufficient fee", self.nodes[0].sendrawtransaction, tx.serialize().hex())
|
||||
|
||||
if __name__ == '__main__':
|
||||
ReplaceByFeeTest().main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue