Skip to content

Commit e3273e0

Browse files
committed
[test] explicitly check default -minrelaytxfee and -incrementalrelayfee
Github-Pull: bitcoin#33106 Rebased-From: 1fbee5d
1 parent cf875f1 commit e3273e0

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

test/functional/mempool_accept.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
import math
1010

1111
from test_framework.test_framework import BitcoinTestFramework
12+
from test_framework.mempool_util import (
13+
DEFAULT_MIN_RELAY_TX_FEE,
14+
DEFAULT_INCREMENTAL_RELAY_FEE,
15+
)
1216
from test_framework.messages import (
1317
MAX_BIP125_RBF_SEQUENCE,
1418
COIN,
@@ -80,6 +84,11 @@ def run_test(self):
8084
assert_equal(node.getblockcount(), 200)
8185
assert_equal(node.getmempoolinfo()['size'], self.mempool_size)
8286

87+
self.log.info("Check default settings")
88+
# Settings are listed in BTC/kvB
89+
assert_equal(node.getmempoolinfo()['minrelaytxfee'], Decimal(DEFAULT_MIN_RELAY_TX_FEE) / COIN)
90+
assert_equal(node.getmempoolinfo()['incrementalrelayfee'], Decimal(DEFAULT_INCREMENTAL_RELAY_FEE) / COIN)
91+
8392
self.log.info('Should not accept garbage to testmempoolaccept')
8493
assert_raises_rpc_error(-3, 'JSON value of type string is not of expected type array', lambda: node.testmempoolaccept(rawtxs='ff00baar'))
8594
assert_raises_rpc_error(-8, 'Array must contain between 1 and 25 transactions.', lambda: node.testmempoolaccept(rawtxs=['ff22']*26))

test/functional/test_framework/mempool_util.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
MiniWallet,
1919
)
2020

21+
# Default for -minrelaytxfee in sat/kvB
22+
DEFAULT_MIN_RELAY_TX_FEE = 1000
23+
# Default for -incrementalrelayfee in sat/kvB
24+
DEFAULT_INCREMENTAL_RELAY_FEE = 1000
2125

2226
def fill_mempool(test_framework, node):
2327
"""Fill mempool until eviction.

0 commit comments

Comments
 (0)