mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
[qa] rpc-tests: Properly use integers, floats
partial backport from #7778 using fa2cea1
This commit is contained in:
parent
c270b62cc2
commit
640666b22f
@ -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:
|
||||
|
@ -91,7 +91,7 @@ class BIP9SoftForksTest(ComparisonTestFramework):
|
||||
self.height = 3 # height of the next block to build
|
||||
self.tip = int ("0x" + self.nodes[0].getbestblockhash() + "L", 0)
|
||||
self.nodeaddress = self.nodes[0].getnewaddress()
|
||||
self.last_block_time = time.time()
|
||||
self.last_block_time = int(time.time())
|
||||
|
||||
assert_equal(self.get_bip9_status(bipName)['status'], 'defined')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user