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

Function mock_getpeerinfo

tests/test_misc.py:190–209  ·  view source on GitHub ↗
(r, error=False)

Source from the content-addressed store, hash-verified

188 }
189
190 def mock_getpeerinfo(r, error=False):
191 if error:
192 return {"id": r["id"], "error": {"code": -1, "message": "unknown"}}
193 return {
194 "id": r["id"],
195 "result": [
196 {
197 "id": 1,
198 "services": "000000000000040d",
199 },
200 {
201 "id": 2,
202 "services": "0000000000000001",
203 },
204 {
205 "id": 3,
206 "services": "0000000000000000",
207 },
208 ],
209 }
210
211 def mock_getblockfrompeer(error=False, release_after=0):
212 getblock_counter = 0

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected