Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.

Commit f0e2c01

Browse files
authored
Update AnteHandler in the Ethermint app (#83)
1 parent 82d016a commit f0e2c01

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/ante.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ func consumeSigGas(meter sdk.GasMeter, pubkey tmcrypto.PubKey) {
173173
switch pubkey.(type) {
174174
case crypto.PubKeySecp256k1:
175175
meter.ConsumeGas(secp256k1VerifyCost, "ante verify: secp256k1")
176+
// TODO: Remove allowing tm Pub key to sign transactions (if intended in final release)
177+
// or until genesis utils are built into the evm or as their own module
178+
case tmcrypto.PubKey:
179+
meter.ConsumeGas(secp256k1VerifyCost, "ante verify: tendermint secp256k1")
176180
default:
177181
panic("Unrecognized signature type")
178182
}

app/ethermint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ func NewEthermintApp(
217217
// initialize BaseApp
218218
app.SetInitChainer(app.InitChainer)
219219
app.SetBeginBlocker(app.BeginBlocker)
220-
app.SetAnteHandler(auth.NewAnteHandler(app.accountKeeper, app.supplyKeeper, auth.DefaultSigVerificationGasConsumer))
220+
app.SetAnteHandler(NewAnteHandler(app.accountKeeper, app.supplyKeeper))
221221
app.SetEndBlocker(app.EndBlocker)
222222

223223
if loadLatest {

0 commit comments

Comments
 (0)