Repository: bitcoin
Issue: intermittent issue in wallet_keypool.py:                                        assert_equal(nodes[0].getwalletinfo()["unlocked_until"], 0)  AssertionError: not(1725366101 == 0)
Labels: CI failed

https://cirrus-ci.com/task/5492198311985152?logs=ci#L4100


```
 node0 2024-09-03T12:21:40.411672Z [httpworker.0] [src/rpc/server.cpp:586] [RPCRunLater] [rpc] queue run of timer lockwallet(default_wallet) in 1 seconds (using HTTP) 
 node0 2024-09-03T12:21:40.416379Z [http] [src/httpserver.cpp:304] [http_request_cb] [http] Received a POST request for / from 127.0.0.1:34622 
 node0 2024-09-03T12:21:40.416429Z [httpworker.1] [src/rpc/request.cpp:232] [parse] [rpc] ThreadRPCServer method=keypoolrefill user=__cookie__ 
 node0 2024-09-03T12:21:40.416556Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: BEGIN TRANSACTION 
 node0 2024-09-03T12:21:40.418471Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: INSERT or REPLACE into main values(?, ?) 
 node0 2024-09-03T12:21:40.418535Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: COMMIT TRANSACTION 
 node0 2024-09-03T12:21:40.418604Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: BEGIN TRANSACTION 
 node0 2024-09-03T12:21:40.420653Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: INSERT or REPLACE into main values(?, ?) 
 node0 2024-09-03T12:21:40.420717Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: COMMIT TRANSACTION 
 node0 2024-09-03T12:21:40.420785Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: BEGIN TRANSACTION 
 node0 2024-09-03T12:21:40.421157Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: INSERT or REPLACE into main values(?, ?) 
 node0 2024-09-03T12:21:40.421550Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: INSERT or REPLACE into main values(?, ?) 
 node0 2024-09-03T12:21:40.423313Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: INSERT or REPLACE into main values(?, ?) 
 node0 2024-09-03T12:21:40.423355Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: COMMIT TRANSACTION 
 node0 2024-09-03T12:21:40.423454Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: BEGIN TRANSACTION 
 node0 2024-09-03T12:21:40.434980Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: INSERT or REPLACE into main values(?, ?) 
 node0 2024-09-03T12:21:40.435100Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: COMMIT TRANSACTION 
 node0 2024-09-03T12:21:40.435243Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: BEGIN TRANSACTION 
 node0 2024-09-03T12:21:40.444594Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: INSERT or REPLACE into main values(?, ?) 
 node0 2024-09-03T12:21:40.444698Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: COMMIT TRANSACTION 
 node0 2024-09-03T12:21:40.444820Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: BEGIN TRANSACTION 
 node0 2024-09-03T12:21:40.445269Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: INSERT or REPLACE into main values(?, ?) 
 node0 2024-09-03T12:21:40.445438Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: INSERT or REPLACE into main values(?, ?) 
 node0 2024-09-03T12:21:40.447113Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: INSERT or REPLACE into main values(?, ?) 
 node0 2024-09-03T12:21:40.447158Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: COMMIT TRANSACTION 
 node0 2024-09-03T12:21:40.447238Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: BEGIN TRANSACTION 
 node0 2024-09-03T12:21:40.449158Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: INSERT or REPLACE into main values(?, ?) 
 node0 2024-09-03T12:21:40.449218Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: COMMIT TRANSACTION 
 node0 2024-09-03T12:21:40.449282Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: BEGIN TRANSACTION 
 node0 2024-09-03T12:21:40.451075Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: INSERT or REPLACE into main values(?, ?) 
 node0 2024-09-03T12:21:40.451142Z [httpworker.1] [src/wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/ci_container_base/ci/scratch/test_runner/test_runner_₿_🏃_20240903_120557/wallet_keypool_157/node0/regtest/default_wallet/wallet.dat] SQLite Statement: COMMIT TRANSACTION 
 node0 2024-09-03T12:21:41.785180Z [http] [src/httpserver.cpp:304] [http_request_cb] [http] Received a POST request for / from 127.0.0.1:34622 
 node0 2024-09-03T12:21:41.785321Z [httpworker.3] [src/rpc/request.cpp:232] [parse] [rpc] ThreadRPCServer method=getwalletinfo user=__cookie__ 
 test  2024-09-03T12:21:41.791000Z TestFramework (ERROR): Assertion failed 
                                   Traceback (most recent call last):
                                     File "/ci_container_base/test/functional/test_framework/test_framework.py", line 132, in main
                                       self.run_test()
                                     File "/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/test/functional/wallet_keypool.py", line 141, in run_test
                                       assert_equal(nodes[0].getwalletinfo()["unlocked_until"], 0)
                                     File "/ci_container_base/test/functional/test_framework/util.py", line 75, in assert_equal
                                       raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args))
                                   AssertionError: not(1725366101 == 0)