* Update vesting spec and impl time fields and constructors * Update genesis to support vesting accounts * More spec and godoc updates * Update genesis section in vesting spec * Fix bank unit tests * Add test cases to ToAccount in genesis * Update RegisterCodec to include vesting interface and types * Fix GetVestedCoins bug where block time is past vesting end time * Add vesting accounts to simulation * Update vesting genesis logic to panic on invalid accounts * Change randomness of vesting accounts in simulation
24 lines
721 B
Go
24 lines
721 B
Go
package auth
|
|
|
|
import (
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
|
)
|
|
|
|
// Register concrete types on codec codec for default AppAccount
|
|
func RegisterCodec(cdc *codec.Codec) {
|
|
cdc.RegisterInterface((*Account)(nil), nil)
|
|
cdc.RegisterConcrete(&BaseAccount{}, "auth/Account", nil)
|
|
cdc.RegisterInterface((*VestingAccount)(nil), nil)
|
|
cdc.RegisterConcrete(&BaseVestingAccount{}, "auth/BaseVestingAccount", nil)
|
|
cdc.RegisterConcrete(&ContinuousVestingAccount{}, "auth/ContinuousVestingAccount", nil)
|
|
cdc.RegisterConcrete(&DelayedVestingAccount{}, "auth/DelayedVestingAccount", nil)
|
|
cdc.RegisterConcrete(StdTx{}, "auth/StdTx", nil)
|
|
}
|
|
|
|
var msgCdc = codec.New()
|
|
|
|
func init() {
|
|
RegisterCodec(msgCdc)
|
|
codec.RegisterCrypto(msgCdc)
|
|
}
|