File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 5050
5151
5252TIME_RANGE_STEP = 600 # ten-minute steps
53+ TIME_RANGE_MTP = TIME_GENESIS_BLOCK + 194 * TIME_RANGE_STEP
5354TIME_RANGE_END = TIME_GENESIS_BLOCK + 200 * TIME_RANGE_STEP
5455
5556
@@ -103,6 +104,7 @@ def _test_getblockchaininfo(self):
103104 res = self .nodes [0 ].getblockchaininfo ()
104105
105106 assert_equal (res ['time' ], TIME_RANGE_END - TIME_RANGE_STEP )
107+ assert_equal (res ['mediantime' ], TIME_RANGE_MTP )
106108
107109 # result should have these additional pruning keys if manual pruning is enabled
108110 assert_equal (sorted (res .keys ()), sorted (['pruneheight' , 'automatic_pruning' ] + keys ))
@@ -310,7 +312,7 @@ def _test_getblockheader(self):
310312 assert_is_hash_string (header ['merkleroot' ])
311313 assert_is_hash_string (header ['bits' ], length = None )
312314 assert isinstance (header ['time' ], int )
313- assert isinstance (header ['mediantime' ], int )
315+ assert_equal (header ['mediantime' ], TIME_RANGE_MTP )
314316 assert isinstance (header ['nonce' ], int )
315317 assert isinstance (header ['version' ], int )
316318 assert isinstance (int (header ['versionHex' ], 16 ), int )
You can’t perform that action at this time.
0 commit comments