3 ms·
Storing the same element the same way isn't really helping against implementation bugs, if going that route, better store in multiple formats (u64, int, or str
by rvnx 3y ago
Storing the same element the same way isn't really helping against implementation bugs, if going that route, better store in multiple formats (u64, int, or string), to protect yourself from a CPU or interpreter or library bug.
In practice, just store the amounts as integer, and if you are really worried, add a checksum (if total balance is not enough).
- DamonHD 3y agoThat pretty much guarantees being the victim of multiple coding bugs...
- alexvitkov 3y agoMaybe, if you're an incredibly bad programmer. Add operator overloading and method to extract the number and you never have look at the internals again.
- GTP 3y agoI think what OP's talking about aren't sw bugs, but rather hw errors like a bit flip caused by an external interference.