From 25d58972db4362ddb444b2d3747228c3c6b91d93 Mon Sep 17 00:00:00 2001 From: austinabell Date: Thu, 15 Aug 2019 12:30:49 -0400 Subject: [PATCH] Update AnteHandler in the Ethermint app --- app/ante.go | 4 ++++ app/ethermint.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/ante.go b/app/ante.go index 4f262a116..f690e4d08 100644 --- a/app/ante.go +++ b/app/ante.go @@ -173,6 +173,10 @@ func consumeSigGas(meter sdk.GasMeter, pubkey tmcrypto.PubKey) { switch pubkey.(type) { case crypto.PubKeySecp256k1: meter.ConsumeGas(secp256k1VerifyCost, "ante verify: secp256k1") + // TODO: Remove allowing tm Pub key to sign transactions (if intended in final release) + // or until genesis utils are built into the evm or as their own module + case tmcrypto.PubKey: + meter.ConsumeGas(secp256k1VerifyCost, "ante verify: tendermint secp256k1") default: panic("Unrecognized signature type") } diff --git a/app/ethermint.go b/app/ethermint.go index bf0b23604..8b487e7e3 100644 --- a/app/ethermint.go +++ b/app/ethermint.go @@ -217,7 +217,7 @@ func NewEthermintApp( // initialize BaseApp app.SetInitChainer(app.InitChainer) app.SetBeginBlocker(app.BeginBlocker) - app.SetAnteHandler(auth.NewAnteHandler(app.accountKeeper, app.supplyKeeper, auth.DefaultSigVerificationGasConsumer)) + app.SetAnteHandler(NewAnteHandler(app.accountKeeper, app.supplyKeeper)) app.SetEndBlocker(app.EndBlocker) if loadLatest {