Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R4R: Add JSON Struct Tags to Vesting Accounts #3651

Merged
merged 1 commit into from
Feb 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions x/auth/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down