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

Function test_checkmessage_pubkey_not_found

tests/test_misc.py:4273–4288  ·  view source on GitHub ↗
(node_factory)

Source from the content-addressed store, hash-verified

4271
4272
4273def test_checkmessage_pubkey_not_found(node_factory):
4274 l1 = node_factory.get_node()
4275
4276 msg = "testcase to check new rpc error"
4277 pubkey = "03be3b0e9992153b1d5a6e1623670b6c3663f72ce6cf2e0dd39c0a373a7de5a3b7"
4278 zbase = "d66bqz3qsku5fxtqsi37j11pci47ydxa95iusphutggz9ezaxt56neh77kxe5hyr41kwgkncgiu94p9ecxiexgpgsz8daoq4tw8kj8yx"
4279
4280 with pytest.raises(RpcError) as exception:
4281 l1.rpc.checkmessage(msg, zbase)
4282 err = exception.value
4283 assert err.error['message'] == "pubkey not found in the graph"
4284 assert err.error['data']['claimed_key'] == pubkey
4285
4286 check_result = l1.rpc.checkmessage(msg, zbase, pubkey=pubkey)
4287 assert check_result["pubkey"] == pubkey
4288 assert check_result["verified"] is True
4289
4290
4291def test_hsm_capabilities(node_factory):

Callers

nothing calls this directly

Calls 2

checkmessageMethod · 0.80
get_nodeMethod · 0.45

Tested by

no test coverage detected