Skip to content

Conversation

craigwrong
Copy link

Function and Test for reverting the last block
Refactored blockchain chainTip (best block hash) into bestBlock ref (indexed block which includes header and metadata)

Nested data limits support in binary decoding
LMDB wrapper now allows getting key and value from cursor Better "rethrows" in DB transaction handlers with throw types and generics

Fixed issue with coins spent in the same block were still added to UTXO set

Fixed issue with file block encoding whereby the length field was incorrect

Also fixed issue and optimized finding transactions in mempool and scanning available block storage

Function and Test for reverting the last block
Refactored blockchain chainTip (best block hash) into bestBlock ref (indexed block which includes header and metadata)

Nested data limits support in binary decoding
LMDB wrapper now allows getting key and value from cursor
Better "rethrows" in DB transaction handlers with throw types and generics

Fixed issue with coins spent in the same block were still added to UTXO set

Fixed issue with file block encoding whereby the length field was incorrec.

Fixes #306
@craigwrong craigwrong added this to the Blockchain milestone Jul 31, 2025
@craigwrong craigwrong self-assigned this Jul 31, 2025
@craigwrong craigwrong added Refactor Code reorganization, readability improvements, clean up Testing Unit and data-driven tests labels Jul 31, 2025
@craigwrong craigwrong linked an issue Jul 31, 2025 that may be closed by this pull request
@craigwrong craigwrong added Bugfix A fix for a previously reported or unreported bug Blocks Blocks of transactions (blockchain) Optimization Performance, stability, reliability, readability Core Bitcoin Core feature parity Chainstate UTXO set or coins Persistence Disk persistence of blocks and state labels Jul 31, 2025
@craigwrong craigwrong merged commit 1a268cc into develop Jul 31, 2025
1 check passed
@craigwrong craigwrong deleted the feature/306-block-undo branch July 31, 2025 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocks Blocks of transactions (blockchain) Bugfix A fix for a previously reported or unreported bug Chainstate UTXO set or coins Core Bitcoin Core feature parity Optimization Performance, stability, reliability, readability Persistence Disk persistence of blocks and state Refactor Code reorganization, readability improvements, clean up Testing Unit and data-driven tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep block undo (revert) information

1 participant