diff options
author | MarcoFalke <falke.marco@gmail.com> | 2016-03-20 18:18:32 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2016-04-01 21:23:30 +0200 |
commit | fa2cea163b49a97e2a18aa125e41170d60ce59cc (patch) | |
tree | 02d1c4fc64dfb2d72e2efb12a4b63392085a9036 /qa/rpc-tests/bip68-sequence.py | |
parent | fa524d9ddbad0a03f9eb974100fb3b6001045645 (diff) |
[qa] rpc-tests: Properly use integers, floats
Diffstat (limited to 'qa/rpc-tests/bip68-sequence.py')
-rwxr-xr-x | qa/rpc-tests/bip68-sequence.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qa/rpc-tests/bip68-sequence.py b/qa/rpc-tests/bip68-sequence.py index 84f941da33..377a35b687 100755 --- a/qa/rpc-tests/bip68-sequence.py +++ b/qa/rpc-tests/bip68-sequence.py @@ -61,7 +61,7 @@ class BIP68Test(BitcoinTestFramework): utxo = utxos[0] tx1 = CTransaction() - value = satoshi_round(utxo["amount"] - self.relayfee)*COIN + value = int(satoshi_round(utxo["amount"] - self.relayfee)*COIN) # Check that the disable flag disables relative locktime. # If sequence locks were used, this would require 1 block for the @@ -179,8 +179,8 @@ class BIP68Test(BitcoinTestFramework): tx.vin.append(CTxIn(COutPoint(int(utxos[j]["txid"], 16), utxos[j]["vout"]), nSequence=sequence_value)) value += utxos[j]["amount"]*COIN # Overestimate the size of the tx - signatures should be less than 120 bytes, and leave 50 for the output - tx_size = len(ToHex(tx))/2 + 120*num_inputs + 50 - tx.vout.append(CTxOut(value-self.relayfee*tx_size*COIN/1000, CScript([b'a']))) + tx_size = len(ToHex(tx))//2 + 120*num_inputs + 50 + tx.vout.append(CTxOut(int(value-self.relayfee*tx_size*COIN/1000), CScript([b'a']))) rawtx = self.nodes[0].signrawtransaction(ToHex(tx))["hex"] try: |