From 81d60bc2839fdb021bb171825b32351d2ba31256 Mon Sep 17 00:00:00 2001 From: gladcow Date: Thu, 18 Oct 2018 16:24:30 +0300 Subject: [PATCH] Fix the issue with transaction amount precision in IS tests (#2353) * fix issue with trx amounts precision in autoix-mempool.py * fix issue with trx amounts precision in p2p-autoinstantsend.py * fix issue with trx amounts precision in p2p-instantsend.py * Rallback adding empty line * Rallback adding empty line --- qa/rpc-tests/autoix-mempool.py | 4 ++-- qa/rpc-tests/p2p-autoinstantsend.py | 4 ++-- qa/rpc-tests/p2p-instantsend.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qa/rpc-tests/autoix-mempool.py b/qa/rpc-tests/autoix-mempool.py index 178ef1f2d..c4f60db32 100755 --- a/qa/rpc-tests/autoix-mempool.py +++ b/qa/rpc-tests/autoix-mempool.py @@ -228,8 +228,8 @@ class AutoIXMempoolTest(BitcoinTestFramework): change_address = node_from.getnewaddress() fee = 0.001 outputs={} - outputs[receiver_address] = amount - outputs[change_address] = in_amount - amount - fee + outputs[receiver_address] = satoshi_round(amount) + outputs[change_address] = satoshi_round(in_amount - amount - fee) rawtx = node_from.createrawtransaction(inputs, outputs) return node_from.signrawtransaction(rawtx) diff --git a/qa/rpc-tests/p2p-autoinstantsend.py b/qa/rpc-tests/p2p-autoinstantsend.py index 4a52f3fef..08792d9c0 100755 --- a/qa/rpc-tests/p2p-autoinstantsend.py +++ b/qa/rpc-tests/p2p-autoinstantsend.py @@ -239,8 +239,8 @@ class AutoInstantSendTest(BitcoinTestFramework): change_address = node_from.getnewaddress() fee = 0.001 outputs={} - outputs[receiver_address] = amount - outputs[change_address] = in_amount - amount - fee + outputs[receiver_address] = satoshi_round(amount) + outputs[change_address] = satoshi_round(in_amount - amount - fee) rawtx = node_from.createrawtransaction(inputs, outputs) return node_from.signrawtransaction(rawtx) diff --git a/qa/rpc-tests/p2p-instantsend.py b/qa/rpc-tests/p2p-instantsend.py index 33aaa755b..29eb9efe0 100755 --- a/qa/rpc-tests/p2p-instantsend.py +++ b/qa/rpc-tests/p2p-instantsend.py @@ -140,8 +140,8 @@ class InstantSendTest(BitcoinTestFramework): change_address = node_from.getnewaddress() fee = 0.001 outputs={} - outputs[receiver_address] = amount - outputs[change_address] = in_amount - amount - fee + outputs[receiver_address] = satoshi_round(amount) + outputs[change_address] = satoshi_round(in_amount - amount - fee) rawtx = node_from.createrawtransaction(inputs, outputs) return node_from.signrawtransaction(rawtx)