Skip to content

trie-db: preserve root when dropping an uncommitted last-key deletion - #237

Open
DicksonWu654 wants to merge 1 commit into
paritytech:masterfrom
DicksonWu654:fix/disable-commit-root
Open

trie-db: preserve root when dropping an uncommitted last-key deletion#237
DicksonWu654 wants to merge 1 commit into
paritytech:masterfrom
DicksonWu654:fix/disable-commit-root

Conversation

@DicksonWu654

Copy link
Copy Markdown

Summary

  • defer publishing a hash-backed root until TrieDBMut::commit
  • preserve the caller root and database when a last-key deletion is dropped with commit-on-drop disabled
  • cover both the aborted and explicit-commit paths across the supported test layouts

Testing

  • cargo test -p trie-db-test test_commit_on_drop -- --nocapture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant