Treat all contracts as pinned for gas costs in reply

This commit is contained in:
Ethan Frey
2021-10-07 11:23:58 +02:00
parent 5e88752011
commit e5dc6fe583

View File

@@ -481,7 +481,8 @@ func (k Keeper) reply(ctx sdk.Context, contractAddress sdk.AccAddress, reply was
return nil, err
}
replyCosts := k.gasRegister.ReplyCosts(k.IsPinnedCode(ctx, contractInfo.CodeID), reply)
// always consider this pinned
replyCosts := k.gasRegister.ReplyCosts(true, reply)
ctx.GasMeter().ConsumeGas(replyCosts, "Loading CosmWasm module: reply")
env := types.NewEnv(ctx, contractAddress)