MCPcopy Create free account
hub / github.com/ElementsProject/lightning / getrawblockbyheight

Function getrawblockbyheight

tests/plugins/badestimate.py:53–61  ·  view source on GitHub ↗
(plugin, height, **kwargs)

Source from the content-addressed store, hash-verified

51
52@plugin.method("getrawblockbyheight")
53def getrawblockbyheight(plugin, height, **kwargs):
54 bhash = bcli(plugin, ["getblockhash", str(height)])
55 if bhash is None:
56 return {"blockhash": None,
57 "block": None}
58 bhash = bhash.strip()
59 block = bcli(plugin, ["getblock", bhash, "0"]).strip()
60 return {"blockhash": bhash,
61 "block": block}
62
63
64@plugin.method("getchaininfo")

Callers

nothing calls this directly

Calls 1

bcliFunction · 0.85

Tested by

no test coverage detected