GetBonds => getBonds
This commit is contained in:
parent
dbdf6aae0e
commit
c788c3e533
|
@ -65,7 +65,7 @@ func (k Keeper) WriteGenesis(ctx sdk.Context) GenesisState {
|
|||
pool := k.GetPool(ctx)
|
||||
params := k.GetParams(ctx)
|
||||
candidates := k.GetCandidates(ctx, 32767)
|
||||
bonds := k.GetBonds(ctx, 32767)
|
||||
bonds := k.getBonds(ctx, 32767)
|
||||
return GenesisState{
|
||||
pool,
|
||||
params,
|
||||
|
|
|
@ -372,7 +372,7 @@ func (k Keeper) GetDelegatorBond(ctx sdk.Context,
|
|||
}
|
||||
|
||||
// load all bonds
|
||||
func (k Keeper) GetBonds(ctx sdk.Context, maxRetrieve int16) (bonds []DelegatorBond) {
|
||||
func (k Keeper) getBonds(ctx sdk.Context, maxRetrieve int16) (bonds []DelegatorBond) {
|
||||
store := ctx.KVStore(k.storeKey)
|
||||
iterator := store.Iterator(subspace(DelegatorBondKeyPrefix))
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ func TestBond(t *testing.T) {
|
|||
assert.True(t, bondsEqual(bond2to1, resBonds[0]))
|
||||
assert.True(t, bondsEqual(bond2to2, resBonds[1]))
|
||||
assert.True(t, bondsEqual(bond2to3, resBonds[2]))
|
||||
allBonds := keeper.GetBonds(ctx, 1000)
|
||||
allBonds := keeper.getBonds(ctx, 1000)
|
||||
require.Equal(t, 6, len(allBonds))
|
||||
assert.True(t, bondsEqual(bond1to1, allBonds[0]))
|
||||
assert.True(t, bondsEqual(bond1to2, allBonds[1]))
|
||||
|
|
Loading…
Reference in New Issue