lightning/bitcoind: adapt and batch fees estimations

This adapts our fee estimations requests to the Bitcoin backend to the
new semantic, and batch the requests.

This makes our request for fees much simpler, and leaves some more
flexibility for a plugin to do something smart (it could still lie before
but now it's explicit, at least.) as we don't explicitly request
estimation for a specific mode and a target.

Changelog-Changed: We now batch the requests for fee estimation to our Bitcoin backend.
Changelog-Changed: We now get more fine-grained fee estimation from our Bitcoin backend.
This commit is contained in:
darosior
2020-03-05 10:58:34 +01:00
committed by Rusty Russell
parent dce2e87928
commit d4fe4073a4
5 changed files with 81 additions and 85 deletions

View File

@@ -11,7 +11,7 @@ from pyln.client import Plugin
plugin = Plugin()
@plugin.method("getfeerate")
@plugin.method("estimatefees")
def getfeerate(plugin, **kwargs):
time.sleep(1)
return {}