mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Circumvent BIP69 sorting in fundrawtransaction.py test (#3100)
"subtractFeeFromOutputs" is applied to the ordering of the input transaction and after that BIP69 sorting is performed. This causes flakiness in tests.
This commit is contained in:
parent
e2d651f601
commit
40399fd973
@ -683,9 +683,10 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||
outputs = {self.nodes[2].getnewaddress(): value for value in (1.0, 1.1, 1.2, 1.3)}
|
||||
rawtx = self.nodes[3].createrawtransaction(inputs, outputs)
|
||||
|
||||
result = [self.nodes[3].fundrawtransaction(rawtx),
|
||||
# Add changePosition=4 to circumvent BIP69 input/output sorting
|
||||
result = [self.nodes[3].fundrawtransaction(rawtx, {"changePosition": 4}),
|
||||
# split the fee between outputs 0, 2, and 3, but not output 1
|
||||
self.nodes[3].fundrawtransaction(rawtx, {"subtractFeeFromOutputs": [0, 2, 3]})]
|
||||
self.nodes[3].fundrawtransaction(rawtx, {"subtractFeeFromOutputs": [0, 2, 3], "changePosition": 4})]
|
||||
|
||||
dec_tx = [self.nodes[3].decoderawtransaction(result[0]['hex']),
|
||||
self.nodes[3].decoderawtransaction(result[1]['hex'])]
|
||||
|
Loading…
Reference in New Issue
Block a user