Skip to content

Commit 020c407

Browse files
committed
Merge pull request #6841
b6d5e32 Make fee aware of min relay in pruning.py RPC test (Alex Morcos)
2 parents ae69a75 + b6d5e32 commit 020c407

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

qa/rpc-tests/pruning.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ def setup_network(self):
6161
self.address[0] = self.nodes[0].getnewaddress()
6262
self.address[1] = self.nodes[1].getnewaddress()
6363

64+
# Determine default relay fee
65+
self.relayfee = self.nodes[0].getnetworkinfo()["relayfee"]
66+
6467
connect_nodes(self.nodes[0], 1)
6568
connect_nodes(self.nodes[1], 2)
6669
connect_nodes(self.nodes[2], 0)
@@ -239,7 +242,7 @@ def mine_full_block(self, node, address):
239242
outputs = {}
240243
t = self.utxo.pop()
241244
inputs.append({ "txid" : t["txid"], "vout" : t["vout"]})
242-
remchange = t["amount"] - Decimal("0.001000")
245+
remchange = t["amount"] - 100*self.relayfee # Fee must be above min relay rate for 66kb tx
243246
outputs[address]=remchange
244247
# Create a basic transaction that will send change back to ourself after account for a fee
245248
# And then insert the 128 generated transaction outs in the middle rawtx[92] is where the #

0 commit comments

Comments
 (0)