Commit 8f4ae65
committed
Merge bitcoin/bitcoin#27009: validation: Skip VerifyDB checks of level >=3 if dbcache is too small
fe683f3 log: Log VerifyDB Progress over multiple lines (Martin Zumsande)
61431e3 validation: Skip VerifyDB checks of level >=3 if dbcache is too small (Martin Zumsande)
Pull request description:
This is the first two commits from #25574, leaving out all changes to `-verifychain` error-handling :
- The Problem of [25563](bitcoin/bitcoin#25563) is that when we skip blocks at level 3 due to an insufficient dbcache (skipping some `DisconnectBlock()` calls), we would still attempt the level 4 checks, attempting to reconnect a block that was never disconnected, leading to an assert in `ConnectBlock()`.
Fix this by not attempting level 4 checks in this case.
- Logging of verification progress is now split over multiple lines. This is more verbose, but now each update has its own timestamp, and other threads logging concurrently will no longer lead to mangled output.
This can be tested with a small `dbcache` value, for example:
`bitcoind -signet -dbcache=10`
`bitcoin-cli -signet verifychain 4 1000`
Fixes #25563
ACKs for top commit:
MarcoFalke:
review ACK fe683f3 🗄
john-moffett:
ACK fe683f3
Tree-SHA512: 3e2e0f8b73cbc518a0fa17912c1956da437787aab95001c110b01048472e0dfe4783c44df22bd903d198069dd2f6b02bfdf74e0b934c7a776f144c2e86cb818a1 file changed
+23
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4081 | 4081 | | |
4082 | 4082 | | |
4083 | 4083 | | |
4084 | | - | |
| 4084 | + | |
| 4085 | + | |
4085 | 4086 | | |
4086 | 4087 | | |
4087 | 4088 | | |
4088 | 4089 | | |
4089 | 4090 | | |
4090 | 4091 | | |
4091 | 4092 | | |
4092 | | - | |
| 4093 | + | |
4093 | 4094 | | |
4094 | 4095 | | |
4095 | 4096 | | |
| |||
4124 | 4125 | | |
4125 | 4126 | | |
4126 | 4127 | | |
4127 | | - | |
4128 | | - | |
4129 | | - | |
4130 | | - | |
4131 | | - | |
4132 | | - | |
4133 | | - | |
4134 | | - | |
4135 | | - | |
| 4128 | + | |
| 4129 | + | |
| 4130 | + | |
| 4131 | + | |
| 4132 | + | |
| 4133 | + | |
| 4134 | + | |
| 4135 | + | |
| 4136 | + | |
| 4137 | + | |
| 4138 | + | |
| 4139 | + | |
| 4140 | + | |
4136 | 4141 | | |
4137 | | - | |
| 4142 | + | |
4138 | 4143 | | |
4139 | 4144 | | |
4140 | 4145 | | |
4141 | 4146 | | |
4142 | 4147 | | |
4143 | 4148 | | |
4144 | 4149 | | |
4145 | | - | |
| 4150 | + | |
| 4151 | + | |
| 4152 | + | |
4146 | 4153 | | |
4147 | 4154 | | |
4148 | 4155 | | |
4149 | 4156 | | |
4150 | | - | |
| 4157 | + | |
4151 | 4158 | | |
4152 | 4159 | | |
4153 | 4160 | | |
4154 | 4161 | | |
4155 | | - | |
| 4162 | + | |
4156 | 4163 | | |
4157 | 4164 | | |
4158 | 4165 | | |
| |||
4167 | 4174 | | |
4168 | 4175 | | |
4169 | 4176 | | |
4170 | | - | |
4171 | | - | |
| 4177 | + | |
4172 | 4178 | | |
4173 | 4179 | | |
4174 | 4180 | | |
| |||
0 commit comments