Skip to content

Commit

Permalink
Fix: mining_getblocktemplate_longpoll.py & mining_prioritisetransacti…
Browse files Browse the repository at this point in the history
…on.py test
  • Loading branch information
meherett committed Jun 10, 2024
1 parent de38d72 commit 263eae8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/functional/mining_getblocktemplate_longpoll.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import random
import threading
from decimal import Decimal

from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import get_rpc_proxy
Expand Down Expand Up @@ -68,7 +69,7 @@ def run_test(self):
with self.nodes[0].assert_debug_log(["ThreadRPCServer method=getblocktemplate"], timeout=3):
thr.start()
# generate a transaction and submit it
self.miniwallet.send_self_transfer(from_node=random.choice(self.nodes))
self.miniwallet.send_self_transfer(from_node=random.choice(self.nodes), fee_rate=Decimal("0.004"))
# after one minute, every 10 seconds the mempool is probed, so in 80 seconds it should have returned
thr.join(60 + 20)
assert not thr.is_alive()
Expand Down
3 changes: 2 additions & 1 deletion test/functional/mining_prioritisetransaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def clear_prioritisation(self, node):
def test_replacement(self):
self.log.info("Test tx prioritisation stays after a tx is replaced")
conflicting_input = self.wallet.get_utxo()
tx_replacee = self.wallet.create_self_transfer(utxo_to_spend=conflicting_input, fee_rate=Decimal("0.0001"))
tx_replacee = self.wallet.create_self_transfer(utxo_to_spend=conflicting_input, fee_rate=Decimal("0.004"))
tx_replacement = self.wallet.create_self_transfer(utxo_to_spend=conflicting_input, fee_rate=Decimal("0.005"))
# Add 1 satoshi fee delta to replacee
self.nodes[0].prioritisetransaction(tx_replacee["txid"], 0, 100)
Expand Down Expand Up @@ -79,6 +79,7 @@ def test_diamond(self):
tx_o_b, tx_o_c = [self.wallet.send_self_transfer(
from_node=self.nodes[0],
utxo_to_spend=u,
fee_rate=Decimal("0.004")
) for u in tx_o_a["new_utxos"]]
txid_b = tx_o_b["txid"]
txid_c = tx_o_c["txid"]
Expand Down

0 comments on commit 263eae8

Please sign in to comment.