Remove all sequence from coin, fixed cli tests

This commit is contained in:
Ethan Frey
2017-07-12 19:25:15 +02:00
parent 1cc671108e
commit 137f8a9ce1
7 changed files with 20 additions and 24 deletions
+3 -5
View File
@@ -15,16 +15,14 @@ import (
type GenesisAccount struct {
Address data.Bytes `json:"address"`
// this from types.Account (don't know how to embed this properly)
PubKey crypto.PubKey `json:"pub_key"` // May be nil, if not known.
Sequence int `json:"sequence"`
Balance Coins `json:"coins"`
PubKey crypto.PubKey `json:"pub_key"` // May be nil, if not known.
Balance Coins `json:"coins"`
}
// ToAccount - GenesisAccount struct to a basecoin Account
func (g GenesisAccount) ToAccount() Account {
return Account{
Sequence: g.Sequence,
Coins: g.Balance,
Coins: g.Balance,
}
}
+2 -3
View File
@@ -39,9 +39,8 @@ func (a *AccountWithKey) Actor() basecoin.Actor {
// This is intended for use in test cases
func (a *AccountWithKey) MakeOption() string {
info := GenesisAccount{
Address: a.Address(),
Sequence: a.Sequence,
Balance: a.Coins,
Address: a.Address(),
Balance: a.Coins,
}
js, err := data.ToJSON(info)
if err != nil {
+1 -2
View File
@@ -63,8 +63,7 @@ func updateCoins(store state.KVStore, addr basecoin.Actor, coins Coins) (acct Ac
// Account - coin account structure
type Account struct {
Coins Coins `json:"coins"`
Sequence int `json:"sequence"`
Coins Coins `json:"coins"`
}
func loadAccount(store state.KVStore, key []byte) (acct Account, err error) {