Skip to content

Commit 4f1000e

Browse files
committed
Merge 3d632c3 into merged_master (Bitcoin PR #20428)
2 parents 91bdd20 + 3d632c3 commit 4f1000e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

test/functional/feature_taproot.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,17 +1455,23 @@ def run_test(self):
14551455
self.nodes[1].generate(101)
14561456
self.test_spenders(self.nodes[1], spenders_taproot_active(), input_counts=[1, 2, 2, 2, 2, 3])
14571457

1458-
# Transfer funds to pre-taproot node.
1458+
# Transfer value of the largest 500 coins to pre-taproot node.
14591459
addr = self.nodes[0].getnewaddress()
1460+
1461+
unsp = self.nodes[1].listunspent()
1462+
unsp = sorted(unsp, key=lambda i: i['amount'], reverse=True)
1463+
unsp = unsp[:500]
1464+
14601465
rawtx = self.nodes[1].createrawtransaction(
14611466
inputs=[{
14621467
'txid': i['txid'],
14631468
'vout': i['vout']
1464-
} for i in self.nodes[1].listunspent()],
1465-
outputs={addr: self.nodes[1].getbalance()['bitcoin']},
1469+
} for i in unsp],
1470+
outputs={addr: sum(i['amount'] for i in unsp)}
14661471
)
14671472
rawtx = self.nodes[1].signrawtransactionwithwallet(rawtx)['hex']
1468-
# Transaction is too large to fit into the mempool, so put it into a block
1473+
1474+
# Mine a block with the transaction
14691475
block = create_block(tmpl=self.nodes[1].getblocktemplate(NORMAL_GBT_REQUEST_PARAMS), txlist=[rawtx])
14701476
add_witness_commitment(block)
14711477
block.rehash()

0 commit comments

Comments
 (0)