Skip to content

Commit

Permalink
Merge pull request #6827
Browse files Browse the repository at this point in the history
bd4c22e [rpc-tests] Check return code (MarcoFalke)
0d8b175 [rpc-tests] fundrawtransaction: Update fee after minRelayTxFee increase (MarcoFalke)
  • Loading branch information
laanwj committed Oct 20, 2015
2 parents c834f56 + bd4c22e commit 87e5539
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions qa/pull-tester/rpc-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
if (len(opts) == 0 or (len(opts) == 1 and "-win" in opts ) or '-extended' in opts
or testScripts[i] in opts or re.sub(".py$", "", testScripts[i]) in opts ):
print "Running testscript " + testScripts[i] + "..."
subprocess.call(rpcTestDir + testScripts[i] + " --srcdir " + buildDir + '/src ' + passOn,shell=True)
subprocess.check_call(rpcTestDir + testScripts[i] + " --srcdir " + buildDir + '/src ' + passOn,shell=True)
#exit if help is called so we print just one set of instructions
p = re.compile(" -h| --help")
if p.match(passOn):
Expand All @@ -112,6 +112,6 @@
if ('-extended' in opts or testScriptsExt[i] in opts
or re.sub(".py$", "", testScriptsExt[i]) in opts):
print "Running 2nd level testscript " + testScriptsExt[i] + "..."
subprocess.call(rpcTestDir + testScriptsExt[i] + " --srcdir " + buildDir + '/src ' + passOn,shell=True)
subprocess.check_call(rpcTestDir + testScriptsExt[i] + " --srcdir " + buildDir + '/src ' + passOn,shell=True)
else:
print "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
10 changes: 9 additions & 1 deletion qa/rpc-tests/fundrawtransaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ def setup_network(self, split=False):

def run_test(self):
print "Mining blocks..."
feeTolerance = Decimal(0.00000002) #if the fee's positive delta is higher than this value tests will fail, neg. delta always fail the tests

min_relay_tx_fee = self.nodes[0].getnetworkinfo()['relayfee']
# if the fee's positive delta is higher than this value tests will fail,
# neg. delta always fail the tests.
# The size of the signature of every input may be at most 2 bytes larger
# than a minimum sized signature.

# = 2 bytes * minRelayTxFeePerByte
feeTolerance = 2 * min_relay_tx_fee/1000

self.nodes[2].generate(1)
self.sync_all()
Expand Down

0 comments on commit 87e5539

Please sign in to comment.