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

Function mock_getblock

tests/test_plugin.py:2251–2264  ·  view source on GitHub ↗
(r)

Source from the content-addressed store, hash-verified

2249 getblockfrompeer_count = 0
2250
2251 def mock_getblock(r):
2252 if getblockfrompeer_count >= retry_count:
2253 conf_file = os.path.join(bitcoind.bitcoin_dir, "bitcoin.conf")
2254 brpc = RawProxy(btc_conf_file=conf_file)
2255 return {
2256 "result": brpc._call(r["method"], *r["params"]),
2257 "error": None,
2258 "id": r["id"]
2259 }
2260 return {
2261 "id": r["id"],
2262 "result": None,
2263 "error": {"code": -1, "message": "Block not available (pruned data)"}
2264 }
2265
2266 def mock_getpeerinfo(r):
2267 return {"id": r["id"], "result": [{"id": 1, "services": "000000000000040d"}]}

Callers

nothing calls this directly

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected