aboutsummaryrefslogtreecommitdiff
path: root/src/qt/locale/bitcoin_la.ts
diff options
context:
space:
mode:
authorAva Chow <github@achow101.com>2024-09-16 16:17:59 -0400
committerAva Chow <github@achow101.com>2024-09-16 16:17:59 -0400
commite983ed41d9f78b15f6107c3aed7c9f5b200cf80e (patch)
treee439096ddaa29377823534e32590598bfbaf6121 /src/qt/locale/bitcoin_la.ts
parentfce9e065c16c7857606d154316e73f9e01c34c9a (diff)
parent6a1aa510e31e8b77793341473aa5afc9d023a6e3 (diff)
Merge bitcoin/bitcoin#30410: rpc, rest: Improve block rpc error handling, check header before attempting to read block data.
6a1aa510e31e8b77793341473aa5afc9d023a6e3 rpc: check block index before reading block / undo data (Martin Zumsande) 6cbf2e5f8197e51b8f3d789ba9f5874a2fd7b93a rpc: Improve gettxoutproof error when only header is available. (Martin Zumsande) 69fc867ea19ba3bd8c38a18b5e3f0e366c46af5b test: add coverage to getblock and getblockstats (Martin Zumsande) 5290cbd58504dcbab97cb0944b3ae0a0f79c4502 rpc: Improve getblock / getblockstats error when only header is available. (Martin Zumsande) e5b537bbdfbfb43ac7bd8e91958e4a2bbd2577ff rest: improve error when only header of a block is available. (Martin Zumsande) Pull request description: Fixes #20978 If a block was pruned, `getblock` already returns a specific error: "Block not available (pruned data)". But if we haven't received the full block yet (e.g. in a race with block downloading after a new block was received headers-first, or during IBD) we just return an unspecific "Block not found on disk" error and log `ERROR: ReadBlockFromDisk: OpenBlockFile failed for FlatFilePos(nFile=-1, nPos=0) ` which suggest something went wrong even though this is a completely normal and expected situation. This PR improves the error message and stops calling `ReadRawBlockFromDisk()`, when we already know from the header that the block is not available on disk. Similarly, it prevents all other rpcs from calling blockstorage read functions unless we expect the data to be there, so that `LogError()` will only be thrown when there is an actual file system problem. I'm not completely sure if the cause is important enough to change the wording of the rpc error, that some scripts may rely on. If reviewers prefer it, an alternative solution would be to keep returning the current "Block not found on disk" error, but return it immediately instead of calling `ReadRawBlockFromDisk`, which would at least prevent the log error and also be an improvement in my opinion. ACKs for top commit: fjahr: re-ACK 6a1aa510e31e8b77793341473aa5afc9d023a6e3 achow101: ACK 6a1aa510e31e8b77793341473aa5afc9d023a6e3 andrewtoth: re-ACK 6a1aa510e31e8b77793341473aa5afc9d023a6e3 Tree-SHA512: 491aef880e8298a05841c4bf8eb913ef84820d1ad5415fd17d9b441bff181959ebfdd432b5eb8347dc9c568433f9a2384ca9d84cd72c79d8a58323ca117538fe
Diffstat (limited to 'src/qt/locale/bitcoin_la.ts')
0 files changed, 0 insertions, 0 deletions