KomodoPlatform / zebra

An ongoing Rust implementation of a Komodo node. 🦓
Apache License 2.0
3 stars 5 forks source link

fix overflow in address balances calculation #6

Closed dimxy closed 1 year ago

dimxy commented 1 year ago

Zebra code supports a database to calculate utxos address balances. Due to increased komodo MAX_MONEY there may be overflows in the balance calculation code, if utxos with big amounts are spent. Although the resulting balance cannot be over MAX_MONEY a couple of internal collecting balance variables can temporarily overflow. Suggestion is to remove the MAX_MONEY limitation on those collecting variables and allow for them to grow to max int64.

dimxy commented 1 year ago

a fix is added in PR #4