@@ -4238,41 +4238,3 @@ def censoring_sendrawtx(r):
42384238 bitcoind .generate_block (1 )
42394239 height = bitcoind .rpc .getblockchaininfo ()['blocks' ]
42404240 l1 .daemon .wait_for_log (r"Low-priority anchorspend aiming for block {} \(feerate 7500\)" .format (height + 12 ))
4241-
4242-
4243- @pytest .mark .slow_test
4244- @unittest .skipIf (os .getenv ('TEST_DB_PROVIDER' , 'sqlite3' ) != 'sqlite3' , "Depends on sqlite3 database location" )
4245- def test_slow_startup_many_addresses (node_factory , bitcoind ):
4246- l1 , l2 = node_factory .get_nodes (2 )
4247-
4248- # Use really high key, to make scanning work hard.
4249- l1 .stop ()
4250- l1 .db_manip ("INSERT INTO vars (name, intval) VALUES ('bip32_max_index', 10000);" )
4251- l1 .start ()
4252-
4253- NUM_CHANS = 20
4254- FUND = 100000
4255-
4256- addr = l1 .rpc .newaddr ()['bech32' ]
4257- bitcoind .rpc .sendtoaddress (addr , (FUND * NUM_CHANS + 1000000 ) / 10 ** 8 )
4258-
4259- bitcoind .generate_block (1 )
4260- sync_blockheight (bitcoind , [l1 ])
4261- l1 .rpc .connect (l2 .info ['id' ], 'localhost' , l2 .port )
4262-
4263- channels = []
4264- for _ in range (NUM_CHANS ):
4265- channels .append (l1 .rpc .fundchannel (l2 .info ['id' ], FUND )['channel_id' ])
4266- bitcoind .generate_block (1 )
4267- wait_for (lambda : all ([c ['state' ] == 'CHANNELD_NORMAL' for c in l1 .rpc .listpeerchannels ()['channels' ]]))
4268-
4269- for c in channels :
4270- l1 .rpc .close (c )
4271-
4272- l1 .stop ()
4273- start = time .time ()
4274- l1 .start ()
4275- end = time .time ()
4276-
4277- # Normally less than a second: give it 10.
4278- assert end - start < 10
0 commit comments