Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core/base_node): safe
mmr_position
cast in horizon sync (#5503)
Description --- Perform safe numeric conversion of the `mmr_position` inside the horizon state sync Motivation and Context --- There was an unsafe cast from `u64` to `u32` of the `mmr_position` inside the horizon state sync. This PR does a safe cast, raising a typed error instead of truncating the value. The existing TODO comment suggested to do it inside the database function, but in my opinion at this point this would overcomplicate the solution. How Has This Been Tested? --- Unit tests What process can a PR reviewer use to test or verify this change? --- <!-- Checklist --> <!-- 1. Is the title of your PR in the form that would make nice release notes? The title, excluding the conventional commit tag, will be included exactly as is in the CHANGELOG, so please think about it carefully. --> Breaking Changes --- - [x] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify <!-- Does this include a breaking change? If so, include this line as a footer --> <!-- BREAKING CHANGE: Description what the user should do, e.g. delete a database, resync the chain --> --------- Co-authored-by: stringhandler <stringhandler@gmail.com> Co-authored-by: SW van Heerden <swvheerden@gmail.com>
- Loading branch information