Change gas & related fields to unsigned integer type (#2839)
* Change gas & related fields to unsigned integer type * Implement AddUint64Overflow
This commit is contained in:
committed by
Jack Zampolin
parent
f525717054
commit
6e813ab3a8
@@ -91,7 +91,6 @@ func (ga *GenesisAccount) ToAccount() (acc *auth.BaseAccount) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Create the core parameters for genesis initialization for gaia
|
||||
// note that the pubkey input is this machines pubkey
|
||||
func GaiaAppGenState(cdc *codec.Codec, genDoc tmtypes.GenesisDoc, appGenTxs []json.RawMessage) (
|
||||
@@ -279,7 +278,7 @@ func CollectStdTxs(cdc *codec.Codec, moniker string, genTxsDir string, genDoc tm
|
||||
|
||||
func NewDefaultGenesisAccount(addr sdk.AccAddress) GenesisAccount {
|
||||
accAuth := auth.NewBaseAccountWithAddress(addr)
|
||||
coins :=sdk.Coins{
|
||||
coins := sdk.Coins{
|
||||
{"fooToken", sdk.NewInt(1000)},
|
||||
{bondDenom, freeFermionsAcc},
|
||||
}
|
||||
|
||||
@@ -475,7 +475,7 @@ func TestGaiaCLISendGenerateSignAndBroadcast(t *testing.T) {
|
||||
require.True(t, success)
|
||||
require.Empty(t, stderr)
|
||||
msg := unmarshalStdTx(t, stdout)
|
||||
require.Equal(t, msg.Fee.Gas, int64(client.DefaultGasLimit))
|
||||
require.Equal(t, msg.Fee.Gas, uint64(client.DefaultGasLimit))
|
||||
require.Equal(t, len(msg.Msgs), 1)
|
||||
require.Equal(t, 0, len(msg.GetSignatures()))
|
||||
|
||||
@@ -486,7 +486,7 @@ func TestGaiaCLISendGenerateSignAndBroadcast(t *testing.T) {
|
||||
require.True(t, success)
|
||||
require.Empty(t, stderr)
|
||||
msg = unmarshalStdTx(t, stdout)
|
||||
require.Equal(t, msg.Fee.Gas, int64(100))
|
||||
require.Equal(t, msg.Fee.Gas, uint64(100))
|
||||
require.Equal(t, len(msg.Msgs), 1)
|
||||
require.Equal(t, 0, len(msg.GetSignatures()))
|
||||
|
||||
@@ -543,9 +543,8 @@ func TestGaiaCLISendGenerateSignAndBroadcast(t *testing.T) {
|
||||
}
|
||||
|
||||
require.Nil(t, app.MakeCodec().UnmarshalJSON([]byte(stdout), &result))
|
||||
require.Equal(t, msg.Fee.Gas, result.Response.GasUsed)
|
||||
require.Equal(t, msg.Fee.Gas, result.Response.GasWanted)
|
||||
|
||||
require.Equal(t, msg.Fee.Gas, uint64(result.Response.GasUsed))
|
||||
require.Equal(t, msg.Fee.Gas, uint64(result.Response.GasWanted))
|
||||
tests.WaitForNextNBlocksTM(2, port)
|
||||
|
||||
barAcc := executeGetAccount(t, fmt.Sprintf("gaiacli query account %s %v", barAddr, flags))
|
||||
|
||||
@@ -25,14 +25,14 @@ func TestAddGenesisAccount(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
"valid account",
|
||||
args{
|
||||
app.GenesisState{},
|
||||
addr1,
|
||||
sdk.Coins{},
|
||||
},
|
||||
false},
|
||||
args{
|
||||
app.GenesisState{},
|
||||
addr1,
|
||||
sdk.Coins{},
|
||||
},
|
||||
false},
|
||||
{"dup account", args{
|
||||
app.GenesisState{Accounts: []app.GenesisAccount{app.GenesisAccount{Address:addr1}}},
|
||||
app.GenesisState{Accounts: []app.GenesisAccount{{Address: addr1}}},
|
||||
addr1,
|
||||
sdk.Coins{}}, true},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user