mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-25 08:52:26 +00:00
functional_tests: add get_fee_estimate to blockchain test
This commit is contained in:
parent
475481949a
commit
1a93aa4b79
2 changed files with 23 additions and 0 deletions
|
@ -70,6 +70,12 @@ class BlockchainTest():
|
||||||
except: ok = True
|
except: ok = True
|
||||||
assert ok
|
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
|
# generate blocks
|
||||||
res_generateblocks = daemon.generateblocks('42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm', blocks)
|
res_generateblocks = daemon.generateblocks('42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm', blocks)
|
||||||
|
|
||||||
|
@ -221,6 +227,12 @@ class BlockchainTest():
|
||||||
assert res.histogram[i].unlocked_instances == 0
|
assert res.histogram[i].unlocked_instances == 0
|
||||||
assert res.histogram[i].recent_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):
|
def _test_alt_chains(self):
|
||||||
print('Testing alt chains')
|
print('Testing alt chains')
|
||||||
daemon = Daemon()
|
daemon = Daemon()
|
||||||
|
|
|
@ -330,3 +330,14 @@ class Daemon(object):
|
||||||
'id': '0'
|
'id': '0'
|
||||||
}
|
}
|
||||||
return self.rpc.send_json_rpc_request(get_alternate_chains)
|
return self.rpc.send_json_rpc_request(get_alternate_chains)
|
||||||
|
|
||||||
|
def get_fee_estimate(self, grace_blocks = 0):
|
||||||
|
get_fee_estimate = {
|
||||||
|
'method': 'get_fee_estimate',
|
||||||
|
'params': {
|
||||||
|
'grace_blocks': grace_blocks,
|
||||||
|
},
|
||||||
|
'jsonrpc': '2.0',
|
||||||
|
'id': '0'
|
||||||
|
}
|
||||||
|
return self.rpc.send_json_rpc_request(get_fee_estimate)
|
||||||
|
|
Loading…
Reference in a new issue