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

Function test_staticbackup

tests/test_misc.py:3033–3044  ·  view source on GitHub ↗

Test staticbackup

(node_factory)

Source from the content-addressed store, hash-verified

3031
3032
3033def test_staticbackup(node_factory):
3034 """
3035 Test staticbackup
3036 """
3037 l1, l2 = node_factory.get_nodes(2, opts=[{}, {}])
3038 l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
3039 c12, _ = l1.fundchannel(l2, 10**5)
3040
3041 # Comparing the channelID, scb_chan has the channel ID starting from the 8th byte
3042 # and it's own length is 32 byte, hence 16 + 64.
3043 assert (len(l1.rpc.staticbackup()["scb"]) == 1
3044 and l1.rpc.staticbackup()["scb"][0][16: 16 + 64] == _["channel_id"])
3045
3046
3047def test_recoverchannel(node_factory):

Callers

nothing calls this directly

Calls 3

get_nodesMethod · 0.80
connectMethod · 0.45
fundchannelMethod · 0.45

Tested by

no test coverage detected