@@ -40,7 +40,7 @@ import Echidna.Types (ExecException(..), fromEVM, emptyAccount)
4040import Echidna.Types.Config (Env (.. ), EConfig (.. ), UIConf (.. ), OperationMode (.. ), OutputFormat (Text ))
4141import Echidna.Types.Coverage (CoverageInfo )
4242import Echidna.Types.Solidity (SolConf (.. ))
43- import Echidna.Types.Tx (TxCall (.. ), Tx (call , dst ), TxResult (.. ), initialTimestamp , initialBlockNumber , getResult )
43+ import Echidna.Types.Tx (TxCall (.. ), Tx (call , dst , delay ), TxResult (.. ), initialTimestamp , initialBlockNumber , getResult )
4444import Echidna.Utility (getTimestamp , timePrefix )
4545
4646-- | Broad categories of execution failures: reversions, illegal operations, and ???.
@@ -184,6 +184,10 @@ execTxWith executeTx tx = do
184184 burnedGas <- gets (. burned)
185185 -- If a transaction reverts reset VM to state before the transaction.
186186 put vmBeforeTx
187+ -- Re-apply the time/block advancement from the transaction's delay.
188+ -- Time doesn't go backwards on revert, only EVM state does.
189+ let txDelay = tx. delay
190+ # block %= \ b -> advanceBlock b txDelay
187191 -- Undo reset of some of the VM state.
188192 -- Otherwise we'd lose all information about the reverted transaction like
189193 -- contract address, calldata, result and traces.
0 commit comments