From 38716d5edc422896610e28f5b8f154058d89300f Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Tue, 15 May 2018 15:02:54 +0200 Subject: [PATCH] ConsumeGas for pubkey.VerifyBytes --- x/auth/ante.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/x/auth/ante.go b/x/auth/ante.go index 4be1c6674d..bf70b3e9b6 100644 --- a/x/auth/ante.go +++ b/x/auth/ante.go @@ -8,6 +8,10 @@ import ( "github.com/spf13/viper" ) +const ( + VerifyCost = 100 +) + // NewAnteHandler returns an AnteHandler that checks // and increments sequence numbers, checks signatures, // and deducts fees from the first signer. @@ -134,6 +138,7 @@ func processSig( } // Check sig. + ctx.GasMeter().ConsumeGas(VerifyCost, "ante verify") if !pubKey.VerifyBytes(signBytes, sig.Signature) { return nil, sdk.ErrUnauthorized("signature verification failed").Result() }