Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Use uint256 when calculating desired BTC for DEx 1 #405
The legacy calculation of the desired BTC amount for DEx 1 was not suitable for larger numbers, resulting in bad data on the RPC layer.
The legacy calculation is part of the consensus code, and was used when calculating the updated desired amount, in case a seller offered more than available. This is no longer possible since 0.0.10, but the code is still needed for historical transactions.
Note that there is some explicit rounding involved now, and the desired amount is rounded up, to ensure a payment really covers the whole amount.
The submission is tagged with "consensus", because it touches consensus code, but the change is not consensus affecting.
Reviewed & tested, looks good to me - OK to merge.