Browse Source

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.
nifty/pset-pre
Christian Decker 5 years ago
committed by Rusty Russell
parent
commit
264b2d1975
  1. 4
      contrib/pyln-testing/pyln/testing/utils.py

4
contrib/pyln-testing/pyln/testing/utils.py

@ -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,

Loading…
Cancel
Save