mintlayer / core

Mintlayer Core
https://www.mintlayer.org/
MIT License
14 stars 4 forks source link

rewards_and_staking: fix the issue of exceeding u64 value of transaction fee #100

Closed b-yap closed 3 years ago

iljakuklic commented 3 years ago

First of all, congratulations for taking PR #100 :smiley:. Could you briefly elaborate on the issue? Did the node reject the test due to u64 overflow or does the node need to be fixed to handle this? Coin/token amounts are usually represented as u128 so it seems a bit weird.

TheQuantumPhysicist commented 3 years ago

The difference between inputs and outputs, which is the reward for miners/stakers, calculated in substrate by default with a u64 type. So, if the difference is too high, I decided to make it fail because that'll cause burning coins