forked from tari-project/tari
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: addition overflow when coinbase + fees is too high (tari-project…
…#5706) Description --- Use a `checked_addition` and catch errors when overflow occurs. Motivation and Context --- Block could be produced and shared that have coinbases and fees that are too high resulting in an overflow and node crash. How Has This Been Tested? --- CI What process can a PR reviewer use to test or verify this change? --- Mostly see if you like what's happening. In `base_node_grpc_server.rs` a fair bit of the new wrapping results in either getting the expected result or returning this specific problem and I'm not so sure it's the most generic way to recover. Breaking Changes --- - [x] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify
- Loading branch information
Showing
6 changed files
with
109 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters