Closed evd0kim closed 1 year ago
bitcoin-cli -regtest -generate 1
pushes CLN into right direction, it syncs.
The fun part is that after generating one more block, CLN syncs with bitcoind even after restart of both CLN and bitcoind.
In my particular case the problem was due to asyncronous environment and too fast requests to CLN. It needed something like 10 seconds to discover 200 blocks.
So putting sleep
in right place solved the problem.
What we usually do is poll getinfo
to wait for the sync to complete, just having a fixed sleep will result in very flaky tests, because the time to sync depends on load on the machine, and various internal timeouts.
@cdecker thanks for response. Yes. I've put getinfo pooling into the test. Actually I've made it like general function for whole toy network so it tracks all CLN clients and main BTC regtest node and looks after CLNs so they aren't out of sync.
Issue and Steps to Reproduce
Issue first appeared as part of building integration tests in Rust.
After that it was confirmed via running regular regtest setup locally.
While bitcoind shows
"verificationprogress":1,"initialblockdownload":false
, CLN remains inStill waiting for initial block download
state indefinitely.CLN script:
Bitcoind setup:
getinfo
outputgetblockchaininfo
output