aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorGregory Sanders <gsanders87@gmail.com>2019-01-23 10:44:13 -0500
committerGregory Sanders <gsanders87@gmail.com>2019-01-24 09:48:34 -0500
commit1e7f7417457a811f1e69a118df4c6e14033ddb55 (patch)
treeec7a74fa8417ca46c9301de550282f8c387f94bd /test/functional/test_framework
parent82cf6813a4ef1b4a5439eb6cddb1ab426f3c31a2 (diff)
remove some magic mining constants in functional tests
Diffstat (limited to 'test/functional/test_framework')
-rwxr-xr-xtest/functional/test_framework/messages.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py
index 356a45d6d0..4bd58519c5 100755
--- a/test/functional/test_framework/messages.py
+++ b/test/functional/test_framework/messages.py
@@ -28,7 +28,7 @@ import struct
import time
from test_framework.siphash import siphash256
-from test_framework.util import hex_str_to_bytes, bytes_to_hex_str
+from test_framework.util import hex_str_to_bytes, bytes_to_hex_str, assert_equal
MIN_VERSION_SUPPORTED = 60001
MY_VERSION = 70014 # past bip-31 for ping/pong
@@ -591,6 +591,8 @@ class CBlockHeader:
% (self.nVersion, self.hashPrevBlock, self.hashMerkleRoot,
time.ctime(self.nTime), self.nBits, self.nNonce)
+BLOCK_HEADER_SIZE = len(CBlockHeader().serialize())
+assert_equal(BLOCK_HEADER_SIZE, 80)
class CBlock(CBlockHeader):
__slots__ = ("vtx",)