Skip to main content
4 events
when toggle format what by license comment
May 25, 2018 at 10:32 comment added user2284570 But both assert() and require() rollback change written to the blockchain so that balance[_to] =balance[_from] +_value would be reverted if assert() or require() condition is triggered isn’t it ? (I’m talking after last year's hardfork). Or does assert() keep change being made ? But both assert() and require() rollback change written to the blockchain so that balance[_to] =balance[_from] +_value would be reverted if assert() or require() condition is triggered isn’t it ? (I’m talking after last year's hardfork). Or does assert() keep change being made ?
Nov 29, 2017 at 3:10 comment added o0ragman0o Much safer not to have unnecessary duplication of logic in the state mutation and the assert argument. To do so could lead to a debugging nightmare where the operations were chained for state but forgotten for the assert.
Nov 28, 2017 at 15:00 comment added Jonathan Lindgren Could I also just write assert(myAmount-amount<myAmount) and skip the __check variable? which one is better, why/why not?
Apr 13, 2017 at 1:33 history answered o0ragman0o CC BY-SA 3.0