Skip to content

Conversation

@victor-tucci
Copy link
Member

No description provided.

The wallet was crashing if you passed in an integer ID in the JSON RPC
command because it was only expecting to read a string for it. This
meant returning the try-catch into epee's serialisation for
`get_value()` which on paper, looks and should be a non-exception
throwing function on failure as it returns a boolean and there's only
one reasonable way for it to fail, that the key doesn't coerce to the
requested type.

Fix a null ID being assigned to the JSON response on error by setting
the ID in the error.
The previous implementation used int64_t values in
std::tuple<int64_t,int64_t,int64_t>, which overflow once chain totals
exceed the signed 64-bit range, causing negative emission values.
Emission, fees, and burnt amounts are non-negative monetary quantities
and should be stored as unsigned long long.
@sanada08 sanada08 self-requested a review December 15, 2025 07:15
@sanada08 sanada08 merged commit bf8bb00 into Beldex-Coin:dev Dec 15, 2025
1 check failed
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.

2 participants