diff options
Diffstat (limited to 'tests/functional_tests/blockchain.py')
-rwxr-xr-x | tests/functional_tests/blockchain.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/functional_tests/blockchain.py b/tests/functional_tests/blockchain.py index 644597584..2c3f34c35 100755 --- a/tests/functional_tests/blockchain.py +++ b/tests/functional_tests/blockchain.py @@ -74,10 +74,16 @@ class BlockchainTest(): # we should not see a block at height ok = False - try: daemon.getblock(height) + try: daemon.getblock(height = height) except: ok = True assert ok + res = daemon.get_fee_estimate() + assert res.fee == 234562 + assert res.quantization_mask == 10000 + res = daemon.get_fee_estimate(10) + assert res.fee <= 234562 + # generate blocks res_generateblocks = daemon.generateblocks('42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm', blocks) @@ -92,7 +98,7 @@ class BlockchainTest(): # get the blocks, check they have the right height res_getblock = [] for n in range(blocks): - res_getblock.append(daemon.getblock(height + n)) + res_getblock.append(daemon.getblock(height = height + n)) block_header = res_getblock[n].block_header assert abs(block_header.timestamp - time.time()) < 10 # within 10 seconds assert block_header.height == height + n @@ -111,7 +117,7 @@ class BlockchainTest(): # we should not see a block after that ok = False - try: daemon.getblock(height + blocks) + try: daemon.getblock(height = height + blocks) except: ok = True assert ok @@ -157,7 +163,7 @@ class BlockchainTest(): # we should not see the popped block anymore ok = False - try: daemon.getblock(height + blocks - 1) + try: daemon.getblock(height = height + blocks - 1) except: ok = True assert ok @@ -229,6 +235,12 @@ class BlockchainTest(): assert res.histogram[i].unlocked_instances == 0 assert res.histogram[i].recent_instances == 0 + res = daemon.get_fee_estimate() + assert res.fee == 234560 + assert res.quantization_mask == 10000 + res = daemon.get_fee_estimate(10) + assert res.fee <= 234560 + def _test_alt_chains(self): print('Testing alt chains') daemon = Daemon() |