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

Function mock_getblockhash

tests/test_pay.py:4986–4996  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

4984 # blockhash. This error is special-cased not to count as the
4985 # backend failing since it is used to poll for the next block.
4986 def mock_getblockhash(req):
4987 # Allow old blocks, for restart.
4988 if int(req['params'][0]) <= height:
4989 return None
4990 return {
4991 "id": req['id'],
4992 "error": {
4993 "code": -8,
4994 "message": "Block height out of range"
4995 }
4996 }
4997
4998 send.daemon.rpcproxy.mock_rpc('getblockhash', mock_getblockhash)
4999 bitcoind.generate_block(100)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected