getblockchaininfo returns verificationprogress=1 and initialblockdownload=false even if there’s background validation.
This PR adds information about background validation to rpc getblockchaininfo in a similar way to validationprogress does.
If assume utxo was used the output of a “sync” node performing background validation:
0$ ./build/bin/bitcoin-cli getblockchaininfo
1...
2 "mediantime": 1756933740,
3 "verificationprogress": 1,
4 "initialblockdownload": false,
5 "backgroundvalidation": true,
6 "background": {
7 "snapshotheight": 880000,
8 "blocks": 527589,
9 "bestblockhash": "0000000000000000002326308420fa5ccd28a9155217f4d1896ab443d84148fa",
10 "mediantime": 1529076654,
11 "chainwork": "0000000000000000000000000000000000000000020c92fab9e5e1d8ed2d8dbc",
12 "verificationprogress": 0.2815790617966284
13 },
14 "chainwork": "0000000000000000000000000000000000000000df97866c410b0302954919d2",
15 "size_on_disk": 61198817285,
16
17...
If assume utxo was not used the progress is hidden and background validation is set to false:
0$ ./build/bin/bitcoin-cli getblockchaininfo
1...
2 "mediantime": 1756245700,
3 "verificationprogress": 1,
4 "initialblockdownload": false,
5 "backgroundvalidation": false,
6 "chainwork": "00000000000000000000000000000000000000000000000000000656d6bb052b",
7 "size_on_disk": 3964972194,
8...
The PR also updates the way we estimate the verification progress returning a 100% on the snapshot block and not on the tip as we will stop doing background validation when reaching it.