Skip to content
This repository has been archived by the owner on Apr 11, 2021. It is now read-only.

Commit

Permalink
patch: supply additional gas to the simulated message
Browse files Browse the repository at this point in the history
  • Loading branch information
gakonst committed Mar 17, 2021
1 parent c09448c commit 5081b63
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/state_transition_ovm.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,16 @@ func EncodeSimulatedMessage(msg Message, timestamp, blockNumber *big.Int, execut
to = &common.Address{0}
}

// temp: hacking on extra gas on top of the calldata passed
extraGas := int64(len(msg.Data())*(16+16) + 250_000)
gas := new(big.Int).Add(big.NewInt(int64(msg.Gas())), big.NewInt(extraGas))
tx := ovmTransaction{
timestamp,
blockNumber, // TODO (what's the correct block number?)
uint8(msg.QueueOrigin().Uint64()),
*msg.L1MessageSender(),
*to,
big.NewInt(int64(msg.Gas())),
gas,
msg.Data(),
}

Expand Down

0 comments on commit 5081b63

Please sign in to comment.