ParseAccount -> AccountDecoder

This commit is contained in:
Ethan Buchman
2018-03-21 02:22:15 +01:00
parent 328dd2f73f
commit e4b8010077
8 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ func main() {
// add query/post commands (custom to binary)
basecliCmd.AddCommand(
client.GetCommands(
authcmd.GetAccountCmd("main", cdc, types.GetParseAccount(cdc)),
authcmd.GetAccountCmd("main", cdc, types.GetAccountDecoder(cdc)),
)...)
basecliCmd.AddCommand(
client.PostCommands(
+2 -2
View File
@@ -22,8 +22,8 @@ type AppAccount struct {
func (acc AppAccount) GetName() string { return acc.Name }
func (acc *AppAccount) SetName(name string) { acc.Name = name }
// Get the ParseAccount function for the custom AppAccount
func GetParseAccount(cdc *wire.Codec) sdk.ParseAccount {
// Get the AccountDecoder function for the custom AppAccount
func GetAccountDecoder(cdc *wire.Codec) sdk.AccountDecoder {
return func(accBytes []byte) (res sdk.Account, err error) {
acct := new(AppAccount)
err = cdc.UnmarshalBinary(accBytes, &acct)