From afd90f88c15af6112e93548e8ba6678e3d7a29ee Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Thu, 14 Feb 2019 10:02:46 -0500 Subject: [PATCH] add JSON struct tags to vesting accounts --- PENDING.md | 1 + x/auth/account.go | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/PENDING.md b/PENDING.md index 3c563a90b59a..a559992b48f6 100644 --- a/PENDING.md +++ b/PENDING.md @@ -42,6 +42,7 @@ IMPROVEMENTS JSON ABCI log. * [\#3620](https://github.com/cosmos/cosmos-sdk/pull/3620) Version command shows build tags * [\#3638] Add Bcrypt benchmarks & justification of security parameter choice + * [\#3648] Add JSON struct tags to vesting accounts. * Tendermint * [\#3618] Upgrade to Tendermint 0.30.03 diff --git a/x/auth/account.go b/x/auth/account.go index 5c60c59a8d44..bc5c75da640c 100644 --- a/x/auth/account.go +++ b/x/auth/account.go @@ -183,11 +183,11 @@ func (acc *BaseAccount) SpendableCoins(_ time.Time) sdk.Coins { type BaseVestingAccount struct { *BaseAccount - OriginalVesting sdk.Coins // coins in account upon initialization - DelegatedFree sdk.Coins // coins that are vested and delegated - DelegatedVesting sdk.Coins // coins that vesting and delegated + OriginalVesting sdk.Coins `json:"original_vesting"` // coins in account upon initialization + DelegatedFree sdk.Coins `json:"delegated_free"` // coins that are vested and delegated + DelegatedVesting sdk.Coins `json:"delegated_vesting"` // coins that vesting and delegated - EndTime int64 // when the coins become unlocked + EndTime int64 `json:"end_time"` // when the coins become unlocked } // String implements fmt.Stringer @@ -343,7 +343,7 @@ var _ VestingAccount = (*ContinuousVestingAccount)(nil) type ContinuousVestingAccount struct { *BaseVestingAccount - StartTime int64 // when the coins start to vest + StartTime int64 `json:"start_time"` // when the coins start to vest } // NewContinuousVestingAccount returns a new ContinuousVestingAccount