Skip to content

chore: extract misc changes from #1567#1721

Merged
drahnr merged 2 commits intonextfrom
bernhard-extract-chore-changes
Mar 2, 2026
Merged

chore: extract misc changes from #1567#1721
drahnr merged 2 commits intonextfrom
bernhard-extract-chore-changes

Conversation

@drahnr
Copy link
Contributor

@drahnr drahnr commented Feb 27, 2026

Chore changes from #1567

  • makes fn apply_vault_delta failable rather than asserting
  • fixes two doclinks
  • removes is_full_state: bool from getter APIs and where it can be asserted/assumed/is an invariant

Intent

Reduce the size of #1567 to make it easier to review

@drahnr drahnr force-pushed the bernhard-extract-chore-changes branch from 4e630ed to 22aca05 Compare February 27, 2026 13:51
@drahnr drahnr added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Feb 27, 2026
@drahnr drahnr marked this pull request as ready for review February 27, 2026 13:53
@drahnr drahnr force-pushed the bernhard-extract-chore-changes branch from 22aca05 to af57184 Compare March 2, 2026 17:57
Comment on lines +28 to +33
#[error(transparent)]
Account(#[from] AccountError),
#[error(transparent)]
Asset(#[from] AssetError),
#[error(transparent)]
Merkle(#[from] MerkleError),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you #[source] these for call site clarity

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use InnerForestError(Box<dyn std::error::Error + Send + Sync + 'static>) but I'd hold off on it until all my PRs are done, similarly for adding map_err(ForestInnerError::$variant) conversions in quite a few places.

let account_id = delta.id();
let is_full_state = delta.is_full_state();

#[cfg(debug_assertions)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an expensive check? If not, maybe we should enable it fully?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not particularly expensive, but it's still a full iteration over all storage maps and entries - for large accounts this could take a bit extra, but I don't think it's excessive.

@drahnr drahnr merged commit 497f5cf into next Mar 2, 2026
18 checks passed
@drahnr drahnr deleted the bernhard-extract-chore-changes branch March 2, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants