Closed DemiMarie closed 5 years ago
@vkomenda I thought the EVM guaranteed wrapping, but I could be wrong.
There must be another way of dealing with non-existent elements
I think there really isn't: https://solidity.readthedocs.io/en/v0.4.21/types.html#mappings Conceptually, mappings are initialized so that all keys exist and have the default value. So a nonexistent element is indistinguishable from one that has been intentionally set to the default value.
@afck, thanks for the link. I concur. @DemiMarie, all I found about the integer overflow spec was an open issue: https://github.com/ethereum/solidity/issues/796 It might be difficult to implement against an evolving spec. So I'd assume implementations can diverge.
These changes allow the smart contracts to successfully initialize, and for the node to successfully boot.