Moved all gas and payment values to uint64 to make sure we are safe here
This commit is contained in:
@@ -103,11 +103,11 @@ func (PriceHandler) DeliverTx(ctx basecoin.Context, store state.SimpleDB,
|
||||
|
||||
// PriceShowTx lets us bounce back a given fee/gas on CheckTx
|
||||
type PriceShowTx struct {
|
||||
GasAllocated uint
|
||||
GasPayment uint
|
||||
GasAllocated uint64
|
||||
GasPayment uint64
|
||||
}
|
||||
|
||||
func NewPriceShowTx(gasAllocated, gasPayment uint) basecoin.Tx {
|
||||
func NewPriceShowTx(gasAllocated, gasPayment uint64) basecoin.Tx {
|
||||
return PriceShowTx{GasAllocated: gasAllocated, GasPayment: gasPayment}.Wrap()
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ func runAllDelivers(ctx basecoin.Context, store state.SimpleDB, txs []basecoin.T
|
||||
func combineChecks(all []basecoin.CheckResult) basecoin.CheckResult {
|
||||
datas := make([]data.Bytes, len(all))
|
||||
logs := make([]string, len(all))
|
||||
var allocated, payments uint
|
||||
var allocated, payments uint64
|
||||
for i, r := range all {
|
||||
datas[i] = r.Data
|
||||
logs[i] = r.Log
|
||||
@@ -97,7 +97,7 @@ func combineChecks(all []basecoin.CheckResult) basecoin.CheckResult {
|
||||
func combineDelivers(all []basecoin.DeliverResult) basecoin.DeliverResult {
|
||||
datas := make([]data.Bytes, len(all))
|
||||
logs := make([]string, len(all))
|
||||
var used uint
|
||||
var used uint64
|
||||
var diffs []*abci.Validator
|
||||
for i, r := range all {
|
||||
datas[i] = r.Data
|
||||
|
||||
@@ -43,8 +43,8 @@ func TestMultiplexer(t *testing.T) {
|
||||
cases := [...]struct {
|
||||
tx basecoin.Tx
|
||||
valid bool
|
||||
gasAllocated uint
|
||||
gasPayment uint
|
||||
gasAllocated uint64
|
||||
gasPayment uint64
|
||||
log string
|
||||
data data.Bytes
|
||||
}{
|
||||
|
||||
Reference in New Issue
Block a user