mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
pyln-testing: Add more meaningful error for mock_estimatefees
We only support a very limited number of argument combinations, and apparently sometimes we trigger a case we aren't handling. This adds a more useful error message, including the params we didn't match.
This commit is contained in:
committed by
Rusty Russell
parent
f1633de6e8
commit
264b2d1975
@@ -871,7 +871,9 @@ class LightningNode(object):
|
|||||||
elif params == [100, 'ECONOMICAL']:
|
elif params == [100, 'ECONOMICAL']:
|
||||||
feerate = feerates[3] * 4
|
feerate = feerates[3] * 4
|
||||||
else:
|
else:
|
||||||
raise ValueError()
|
raise ValueError("Don't have a feerate set for {}/{}.".format(
|
||||||
|
params[0], params[1],
|
||||||
|
))
|
||||||
return {
|
return {
|
||||||
'id': r['id'],
|
'id': r['id'],
|
||||||
'error': None,
|
'error': None,
|
||||||
|
|||||||
Reference in New Issue
Block a user