Skip to content

Commit 87e5539

Browse files
committed
Merge pull request #6827
bd4c22e [rpc-tests] Check return code (MarcoFalke) 0d8b175 [rpc-tests] fundrawtransaction: Update fee after minRelayTxFee increase (MarcoFalke)
2 parents c834f56 + bd4c22e commit 87e5539

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

qa/pull-tester/rpc-tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
if (len(opts) == 0 or (len(opts) == 1 and "-win" in opts ) or '-extended' in opts
102102
or testScripts[i] in opts or re.sub(".py$", "", testScripts[i]) in opts ):
103103
print "Running testscript " + testScripts[i] + "..."
104-
subprocess.call(rpcTestDir + testScripts[i] + " --srcdir " + buildDir + '/src ' + passOn,shell=True)
104+
subprocess.check_call(rpcTestDir + testScripts[i] + " --srcdir " + buildDir + '/src ' + passOn,shell=True)
105105
#exit if help is called so we print just one set of instructions
106106
p = re.compile(" -h| --help")
107107
if p.match(passOn):
@@ -112,6 +112,6 @@
112112
if ('-extended' in opts or testScriptsExt[i] in opts
113113
or re.sub(".py$", "", testScriptsExt[i]) in opts):
114114
print "Running 2nd level testscript " + testScriptsExt[i] + "..."
115-
subprocess.call(rpcTestDir + testScriptsExt[i] + " --srcdir " + buildDir + '/src ' + passOn,shell=True)
115+
subprocess.check_call(rpcTestDir + testScriptsExt[i] + " --srcdir " + buildDir + '/src ' + passOn,shell=True)
116116
else:
117117
print "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"

qa/rpc-tests/fundrawtransaction.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,15 @@ def setup_network(self, split=False):
2828

2929
def run_test(self):
3030
print "Mining blocks..."
31-
feeTolerance = Decimal(0.00000002) #if the fee's positive delta is higher than this value tests will fail, neg. delta always fail the tests
31+
32+
min_relay_tx_fee = self.nodes[0].getnetworkinfo()['relayfee']
33+
# if the fee's positive delta is higher than this value tests will fail,
34+
# neg. delta always fail the tests.
35+
# The size of the signature of every input may be at most 2 bytes larger
36+
# than a minimum sized signature.
37+
38+
# = 2 bytes * minRelayTxFeePerByte
39+
feeTolerance = 2 * min_relay_tx_fee/1000
3240

3341
self.nodes[2].generate(1)
3442
self.sync_all()

0 commit comments

Comments
 (0)