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

Function test_bitcoin_backend_gianttx

tests/test_plugin.py:2150–2164  ·  view source on GitHub ↗

Test that a giant tx doesn't crash bcli

(node_factory, bitcoind)

Source from the content-addressed store, hash-verified

2148
2149
2150def test_bitcoin_backend_gianttx(node_factory, bitcoind):
2151 """Test that a giant tx doesn't crash bcli"""
2152 # This complains about how long fundpsbt took.
2153 l1 = node_factory.get_node(start=False, broken_log="That's weird: Request .*psbt took")
2154 # With memleak we spend far too much time gathering backtraces.
2155 if "LIGHTNINGD_DEV_MEMLEAK" in l1.daemon.env:
2156 del l1.daemon.env["LIGHTNINGD_DEV_MEMLEAK"]
2157 l1.start()
2158 addrs = {addr: 0.00200000 for addr in [l1.rpc.newaddr('bech32')['bech32'] for _ in range(700)]}
2159 bitcoind.rpc.sendmany("", addrs)
2160 bitcoind.generate_block(1, wait_for_mempool=1)
2161 sync_blockheight(bitcoind, [l1])
2162
2163 l1.rpc.withdraw(bitcoind.getnewaddress(), 'all')
2164 bitcoind.generate_block(1, wait_for_mempool=1)
2165
2166
2167def test_bitcoin_bad_estimatefee(node_factory, bitcoind):

Callers

nothing calls this directly

Calls 7

sync_blockheightFunction · 0.90
generate_blockMethod · 0.80
get_nodeMethod · 0.45
startMethod · 0.45
newaddrMethod · 0.45
withdrawMethod · 0.45
getnewaddressMethod · 0.45

Tested by

no test coverage detected