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:
Christian Decker 2020-04-13 15:31:22 +02:00 committed by Rusty Russell
parent f1633de6e8
commit 264b2d1975

View File

@ -871,7 +871,9 @@ class LightningNode(object):
elif params == [100, 'ECONOMICAL']:
feerate = feerates[3] * 4
else:
raise ValueError()
raise ValueError("Don't have a feerate set for {}/{}.".format(
params[0], params[1],
))
return {
'id': r['id'],
'error': None,