diff options
author | BtcDrak <btcdrak@gmail.com> | 2016-04-03 18:03:53 +0100 |
---|---|---|
committer | BtcDrak <btcdrak@gmail.com> | 2016-04-03 18:06:06 +0100 |
commit | 640666b22fdbc6f436fbf701629b04a2367f7317 (patch) | |
tree | d6d6a4aa01f417685a69d1a8531bd7ef61c6816a /qa/rpc-tests/bip68-sequence.py | |
parent | c270b62cc20788bdc59cd648c971523bab7ec8fc (diff) |
[qa] rpc-tests: Properly use integers, floats
partial backport from #7778 using fa2cea1
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 bd61282fa1..40c9eff885 100755 --- a/qa/rpc-tests/bip68-sequence.py +++ b/qa/rpc-tests/bip68-sequence.py @@ -62,7 +62,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 @@ -180,8 +180,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: |