aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/test_framework/mininode.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2016-01-19 17:47:55 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-04-05 11:53:50 +0200
commitad8c743421a9e64fea4ede8072fe07b4d266c1a8 (patch)
tree204a022a1ed2deaf225d100a7d045a2167f46ade /qa/rpc-tests/test_framework/mininode.py
parentd89fbfe89931cf1beaad2e239245c886e3ab17e9 (diff)
downloadbitcoin-ad8c743421a9e64fea4ede8072fe07b4d266c1a8.tar.xz
[qa] Extend tests
Github-Pull: #7684 Rebased-From: fa3a81af18347a1d3fed41aa89ee643cbf0e7abc fad7dc8a6c0ca9c067a249cf8896dd2e64703e48 fad8cfb893ac0ba83c6fc2367ade55bfe4fa75f6
Diffstat (limited to 'qa/rpc-tests/test_framework/mininode.py')
-rwxr-xr-xqa/rpc-tests/test_framework/mininode.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py
index 81bb439cea..934d0c7a75 100755
--- a/qa/rpc-tests/test_framework/mininode.py
+++ b/qa/rpc-tests/test_framework/mininode.py
@@ -38,6 +38,8 @@ MY_SUBVERSION = "/python-mininode-tester:0.0.1/"
MAX_INV_SZ = 50000
MAX_BLOCK_SIZE = 1000000
+COIN = 100000000L # 1 btc in satoshis
+
# Keep our own socket map for asyncore, so that we can track disconnects
# ourselves (to workaround an issue with closing an asyncore socket when
# using select)
@@ -377,7 +379,7 @@ class CTxOut(object):
def __repr__(self):
return "CTxOut(nValue=%i.%08i scriptPubKey=%s)" \
- % (self.nValue // 100000000, self.nValue % 100000000,
+ % (self.nValue // COIN, self.nValue % COIN,
binascii.hexlify(self.scriptPubKey))
@@ -426,7 +428,7 @@ class CTransaction(object):
def is_valid(self):
self.calc_sha256()
for tout in self.vout:
- if tout.nValue < 0 or tout.nValue > 21000000L * 100000000L:
+ if tout.nValue < 0 or tout.nValue > 21000000 * COIN:
return False
return True