Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
rigelrozanski committed Jun 5, 2018
1 parent 0efb0a4 commit 2153e0d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions x/stake/keeper/delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ func (k PrivlegedKeeper) Delegate(ctx sdk.Context, delegatorAddr sdk.Address,

// load a delegator bond
func (k Keeper) GetUnbondingDelegation(ctx sdk.Context,
delegationKey []byte) (bond types.UnbondingDelegation, found bool) {
DelegatorAddr, ValidatorAddr sdk.Address) (bond types.UnbondingDelegation, found bool) {

store := ctx.KVStore(k.storeKey)
delegatorBytes := store.Get(delegationKey)
delegatorBytes := store.Get(UnbondingDelegationKey)
if delegatorBytes == nil {
return bond, false
}
Expand Down
26 changes: 15 additions & 11 deletions x/stake/keeper/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@ import (
//nolint
var (
// Keys for store prefixes
ParamKey = []byte{0x00} // key for parameters relating to staking
PoolKey = []byte{0x01} // key for the staking pools
ValidatorsKey = []byte{0x02} // prefix for each key to a validator
ValidatorsByPubKeyIndexKey = []byte{0x03} // prefix for each key to a validator by pubkey
ValidatorsBondedIndexKey = []byte{0x04} // prefix for each key to bonded/actively validating validators
ValidatorsByPowerIndexKey = []byte{0x05} // prefix for each key to a validator sorted by power
ValidatorCliffIndexKey = []byte{0x06} // key for block-local tx index
ValidatorPowerCliffKey = []byte{0x07} // key for block-local tx index
TendermintUpdatesKey = []byte{0x08} // prefix for each key to a validator which is being updated
DelegationKey = []byte{0x09} // prefix for each key to a delegator's bond
IntraTxCounterKey = []byte{0x10} // key for block-local tx index
ParamKey = []byte{0x00} // key for parameters relating to staking
PoolKey = []byte{0x01} // key for the staking pools
ValidatorsKey = []byte{0x02} // prefix for each key to a validator
ValidatorsByPubKeyIndexKey = []byte{0x03} // prefix for each key to a validator index, by pubkey
ValidatorsBondedIndexKey = []byte{0x04} // prefix for each key to a validator index, for bonded validators
ValidatorsByPowerIndexKey = []byte{0x05} // prefix for each key to a validator index, sorted by power
ValidatorCliffIndexKey = []byte{0x06} // key for the validator index of the cliff validator
ValidatorPowerCliffKey = []byte{0x07} // key for the power of the validator on the cliff
TendermintUpdatesKey = []byte{0x08} // prefix for each key to a validator which is being updated
DelegationKey = []byte{0x09} // key for a delegation
UnbondingDelegationKey = []byte{0x0A} // key for an unbonding-delegation
UnbondingDelegationByValIndexKey = []byte{0x0B} // prefix for each key for an unbonding-delegation, by validator owner
RedelegationKey = []byte{0x0C} // key for a redelegation
RedelegationByValIndexKey = []byte{0x0D} // prefix for each key for an redelegation, by validator owner
IntraTxCounterKey = []byte{0x0E} // key for intra-block tx index
)

const maxDigitsForAccount = 12 // ~220,000,000 atoms created at launch
Expand Down

0 comments on commit 2153e0d

Please sign in to comment.