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

Function test_checkrune

tests/test_runes.py:479–497  ·  view source on GitHub ↗
(node_factory)

Source from the content-addressed store, hash-verified

477
478
479def test_checkrune(node_factory):
480 l1 = node_factory.get_node()
481 rune1 = l1.rpc.createrune()
482 rune2 = l1.rpc.createrune(restrictions="readonly")
483
484 res1 = l1.rpc.checkrune(nodeid=l1.info['id'],
485 rune=rune1['rune'],
486 method='invoice',
487 params={'amount_msat': '10000'})
488
489 assert res1['valid'] is True
490
491 with pytest.raises(RpcError, match='Not permitted:') as exc_info:
492 l1.rpc.call(method='checkrune',
493 payload={'nodeid': l1.info['id'],
494 'rune': rune2['rune'],
495 'method': 'invoice',
496 'params': {"amount_msat": "1000", "label": "lbl", "description": "tipjar"}})
497 assert exc_info.value.error['code'] == 0x5de
498
499
500def test_rune_pay_amount(node_factory):

Callers

nothing calls this directly

Calls 2

get_nodeMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected