You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not true and causes issues in code that check for Limit before performing an action: CosmWasm/wasmd#539 (review)
The main point being there is no clear way to determine how much gas is left in the meter. Maybe you could expose a separate function to return that info. But, just returning max.Uint64 for infiniteGasMeter.Limit() would be a good start.
Version
v0.42.6, master, probably every other known version
Steps to Reproduce
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate contributors tagged
Contributor assigned/self-assigned
The text was updated successfully, but these errors were encountered:
That says how much was consumed, not how much was left.
We need to use this remaining gas as a limit in wasmer for the smart contracts. And have to special case limit == 0 only as we know the implementation of InfiniteGasMeter, which is fragile
Summary of Bug
Limit()
on InfiniteGasMeter always returns0
: https://github.com/cosmos/cosmos-sdk/blob/master/store/types/gas.go#L148-L150This is not true and causes issues in code that check for Limit before performing an action: CosmWasm/wasmd#539 (review)
The main point being there is no clear way to determine how much gas is left in the meter. Maybe you could expose a separate function to return that info. But, just returning
max.Uint64
forinfiniteGasMeter.Limit()
would be a good start.Version
v0.42.6, master, probably every other known version
Steps to Reproduce
For Admin Use
The text was updated successfully, but these errors were encountered: