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

Function test_sql_crash

tests/test_plugin.py:4696–4713  ·  view source on GitHub ↗

sub-object with inner-sub-object is missing -> Crash. This only happens for local and remote inside listpeerchannels.update (for now).

(node_factory, bitcoind)

Source from the content-addressed store, hash-verified

4694
4695
4696def test_sql_crash(node_factory, bitcoind):
4697 """sub-object with inner-sub-object is missing -> Crash. This only
4698 happens for local and remote inside listpeerchannels.update (for
4699 now).
4700
4701 """
4702 l1, l2 = node_factory.line_graph(2, fundchannel=False)
4703
4704 addr = l1.rpc.newaddr('bech32')['bech32']
4705 bitcoind.rpc.sendtoaddress(addr, 1)
4706 bitcoind.generate_block(1)
4707
4708 wait_for(lambda: l1.rpc.listfunds()['outputs'] != [])
4709
4710 l1.rpc.fundchannel_start(l2.info['id'], '10000000sat')
4711
4712 assert 'updates' not in only_one(l1.rpc.listpeerchannels()['channels'])
4713 l1.rpc.sql(f"SELECT * FROM peerchannels;")
4714
4715
4716def test_sql_parallel(node_factory, executor):

Callers

nothing calls this directly

Calls 8

wait_forFunction · 0.90
only_oneFunction · 0.90
line_graphMethod · 0.80
generate_blockMethod · 0.80
fundchannel_startMethod · 0.80
listpeerchannelsMethod · 0.80
newaddrMethod · 0.45
listfundsMethod · 0.45

Tested by

no test coverage detected