forked from cerc-io/laconicd-deprecated
Update AnteHandler in the Ethermint app (#83)
This commit is contained in:
parent
82d016ab02
commit
f0e2c01f57
@ -173,6 +173,10 @@ func consumeSigGas(meter sdk.GasMeter, pubkey tmcrypto.PubKey) {
|
|||||||
switch pubkey.(type) {
|
switch pubkey.(type) {
|
||||||
case crypto.PubKeySecp256k1:
|
case crypto.PubKeySecp256k1:
|
||||||
meter.ConsumeGas(secp256k1VerifyCost, "ante verify: secp256k1")
|
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:
|
default:
|
||||||
panic("Unrecognized signature type")
|
panic("Unrecognized signature type")
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,7 @@ func NewEthermintApp(
|
|||||||
// initialize BaseApp
|
// initialize BaseApp
|
||||||
app.SetInitChainer(app.InitChainer)
|
app.SetInitChainer(app.InitChainer)
|
||||||
app.SetBeginBlocker(app.BeginBlocker)
|
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)
|
app.SetEndBlocker(app.EndBlocker)
|
||||||
|
|
||||||
if loadLatest {
|
if loadLatest {
|
||||||
|
Loading…
Reference in New Issue
Block a user