bitcoinknots / bitcoin

Bitcoin Knots enhanced Bitcoin node/wallet software
MIT License
200 stars 60 forks source link

IBD latching to false incorrectly #47

Closed ghost closed 1 year ago

ghost commented 2 years ago

I am not sure but this look incorrect based on the logs, can we improve something in this or its working as expected?

2022-02-02T14:12:20Z Leaving InitialBlockDownload (latching to false)
2022-02-02T14:12:25Z UpdateTip: new best=00000000000000ae5cb9e230a74150f2ebe4626c734f10a3be9271b73b337d48 height=2138397 version=0x20400000 log2_work=74.640361 tx=61958978 date='2022-02-01T14:19:28Z' progress=0.999884 cache=4.9MiB(36113txo)
2022-02-02T14:12:26Z UpdateTip: new best=00000000000000031137821d5c938a4bdf58d872421af31864f628af568cb3a0 height=2138398 version=0x20200000 log2_work=74.640366 tx=61958992 date='2022-02-01T14:24:06Z' progress=0.999884 cache=4.9MiB(36122txo)
2022-02-02T14:12:28Z UpdateTip: new best=00000000000000a3367a95d3080eba2e95980059640ddc5a7a98e6b5749b00b6 height=2138399 version=0x20400000 log2_work=74.640370 tx=61959042 date='2022-02-01T14:40:16Z' progress=0.999885 cache=4.9MiB(36218txo)
2022-02-02T14:12:29Z UpdateTip: new best=00000000000000b96b0deb400b69039a02285ee3159a43a5e55e6c4bc8f2e759 height=2138400 version=0x20600000 log2_work=74.640374 tx=61959070 date='2022-02-01T14:49:03Z' progress=0.999886 cache=4.9MiB(36251txo)
2022-02-02T14:12:30Z UpdateTip: new best=0000000000000014e10c4d1c00619ff10111912a7cbd61da43d29628e708983d height=2138401 version=0x20600000 log2_work=74.640379 tx=61959074 date='2022-02-01T14:49:58Z' progress=0.999886 cache=4.9MiB(36266txo)
2022-02-02T14:12:31Z UpdateTip: new best=00000000000000c5edb57c8d98d0e8a589c1e0ceb66c7e2cf7a005e0032187bb height=2138402 version=0x20c00000 log2_work=74.640383 tx=61959086 date='2022-02-01T14:52:38Z' progress=0.999886 cache=4.9MiB(36278txo)
luke-jr commented 2 years ago

Why is it incorrect?

ghost commented 2 years ago
2022-02-03T19:51:21Z UpdateTip: new best=00000000000000313c2faa76d2087540654df4a93e3c5ea30320810a4d41f956 height=2138745 version=0x20e00000 log2_work=74.641823 tx=61966151 date='2022-02-02T19:31:17Z' progress=0.999882 cache=0.4MiB(3117txo)
2022-02-03T19:51:22Z Leaving InitialBlockDownload (latching to false)
2022-02-03T19:51:27Z UpdateTip: new best=00000000b0ed222e173d7db26524f983968385715d687605c2f34bd143f58df4 height=2138746 version=0x20000000 log2_work=74.641823 tx=61966216 date='2022-02-02T19:51:30Z' progress=0.999883 cache=0.4MiB(3228txo)
2022-02-03T19:51:27Z UpdateTip: new best=00000000000000692e30c2201acaef941fadad906019dd9f79da82ae6e5bdada height=2138747 version=0x20004000 log2_work=74.641827 tx=61966239 date='2022-02-02T19:56:18Z' progress=0.999884 cache=0.5MiB(3278txo)

I assumed it should do it when progress is more than 0.999999