Change gas & related fields to unsigned integer type (#2839)

* Change gas & related fields to unsigned integer type
* Implement AddUint64Overflow
This commit is contained in:
Alexander Bezobchuk
2018-11-19 09:13:45 -08:00
committed by Jack Zampolin
parent f525717054
commit 6e813ab3a8
25 changed files with 127 additions and 68 deletions
+3 -1
View File
@@ -203,8 +203,10 @@ func (c Context) WithConsensusParams(params *abci.ConsensusParams) Context {
if params == nil {
return c
}
// TODO: Do we need to handle invalid MaxGas values?
return c.withValue(contextKeyConsensusParams, params).
WithGasMeter(NewGasMeter(params.BlockSize.MaxGas))
WithGasMeter(NewGasMeter(uint64(params.BlockSize.MaxGas)))
}
func (c Context) WithChainID(chainID string) Context { return c.withValue(contextKeyChainID, chainID) }