Consume extra gas to be equal to 59774
This commit is contained in:
parent
85fdc5c83b
commit
16e5b65175
|
@ -33,6 +33,9 @@ func (wh WormholeIbcErrorDecorator) AnteHandle(request sdk.Request, tx sdk.Tx, s
|
||||||
case *ibcchanneltypes.MsgChannelOpenInit:
|
case *ibcchanneltypes.MsgChannelOpenInit:
|
||||||
// we've verified it's the IBC Channel Open Init message.
|
// we've verified it's the IBC Channel Open Init message.
|
||||||
// fail with the proper error message
|
// fail with the proper error message
|
||||||
|
// failing early uses 55613 gas in total. We need to use 59774 gas to get the same apphash.
|
||||||
|
// 59774 - 55613 = 4161
|
||||||
|
request.GasMeter().ConsumeGas(4161, "consuming extra gas so the transaction uses 59,774 gas")
|
||||||
return request, errors.New("failed to execute message; message index: 0: route not found to module: wasm: route not found")
|
return request, errors.New("failed to execute message; message index: 0: route not found to module: wasm: route not found")
|
||||||
default:
|
default:
|
||||||
return next(request, tx, simulate)
|
return next(request, tx, simulate)
|
||||||
|
|
Loading…
Reference in New Issue