Skip to content

Commit

Permalink
Moving resetCaller update to delegateCall
Browse files Browse the repository at this point in the history
  • Loading branch information
msooseth committed Dec 2, 2024
1 parent 665ccac commit 0371caf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/EVM.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1104,8 +1104,6 @@ callChecks this xGas xContext xTo xValue xInOffset xInSize xOutOffset xOutSize x
availableGas <- use (#state % #gas)
let recipientExists = accountExists xContext vm
let from = fromMaybe vm.state.contract vm.state.overrideCaller
resetCaller <- use $ #state % #resetCaller
when resetCaller $ assign (#state % #overrideCaller) Nothing
fromBal <- preuse $ #env % #contracts % ix from % #balance
costOfCall fees recipientExists xValue availableGas xGas xTo $ \cost gas' -> do
let checkCallDepth =
Expand Down Expand Up @@ -1971,6 +1969,8 @@ delegateCall this gasGiven xTo xContext xValue xInOffset xInSize xOutOffset xOut
| otherwise =
callChecks this gasGiven xContext xTo xValue xInOffset xInSize xOutOffset xOutSize xs $
\xGas -> do
resetCaller <- use $ #state % #resetCaller
when resetCaller $ assign (#state % #overrideCaller) Nothing
vm0 <- get
fetchAccount xTo $ \target -> case target.code of
UnknownCode _ -> do
Expand Down

0 comments on commit 0371caf

Please sign in to comment.