Favor marshal unmashal binare bare (#5799)
* change abci file to use BinaryBare * change all calls to EncodeLengthPrefixed to BinaryBare in distribution keeper store. * change all calls to EncodeLengthPrefixed to BinaryBare in mint keeper store. * change all calls to EncodeLengthPrefixed to BinaryBare in auth keeper store. * change all calls to EncodeLengthPrefixed to BinaryBare in distribution keeper store. * change all calls to EncodeLengthPrefixed to BinaryBare in staking keeper store. * change all calls to EncodeLengthPrefixed to BinaryBare in staking keeper store. * change all calls to EncodeLengthPrefixed to BinaryBare in gov keeper store. * change all calls to EncodeLengthPrefixed to BinaryBare in slashing keeper store. * update decoder test * migrate decoder * migrate gov simulation decoder * migrate baseapp_test * refactor QuerySubspace * refactor coedc std codec * migrate keybase * migrate iavl store * migrate root multi * migrate ante basic * migrate tx type to bare * migrate auth client * update auth types * update decoder * migrate supply decoder * migrate stake encoding * migrate staking simulation * migrate genutil * migrate simapp test helpers * migrate docs * upgrade changelog * Update CHANGELOG.md Co-Authored-By: Alexander Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
This commit is contained in:
co-authored by
Alexander Bezobchuk
parent
b87f5934f5
commit
2e42f9cb74
@@ -40,12 +40,12 @@ func TestDecodeStore(t *testing.T) {
|
||||
red := types.NewRedelegation(delAddr1, valAddr1, valAddr1, 12, bondTime, sdk.OneInt(), sdk.OneDec())
|
||||
|
||||
kvPairs := tmkv.Pairs{
|
||||
tmkv.Pair{Key: types.LastTotalPowerKey, Value: cdc.MustMarshalBinaryLengthPrefixed(sdk.OneInt())},
|
||||
tmkv.Pair{Key: types.GetValidatorKey(valAddr1), Value: cdc.MustMarshalBinaryLengthPrefixed(val)},
|
||||
tmkv.Pair{Key: types.LastTotalPowerKey, Value: cdc.MustMarshalBinaryBare(sdk.OneInt())},
|
||||
tmkv.Pair{Key: types.GetValidatorKey(valAddr1), Value: cdc.MustMarshalBinaryBare(val)},
|
||||
tmkv.Pair{Key: types.LastValidatorPowerKey, Value: valAddr1.Bytes()},
|
||||
tmkv.Pair{Key: types.GetDelegationKey(delAddr1, valAddr1), Value: cdc.MustMarshalBinaryLengthPrefixed(del)},
|
||||
tmkv.Pair{Key: types.GetUBDKey(delAddr1, valAddr1), Value: cdc.MustMarshalBinaryLengthPrefixed(ubd)},
|
||||
tmkv.Pair{Key: types.GetREDKey(delAddr1, valAddr1, valAddr1), Value: cdc.MustMarshalBinaryLengthPrefixed(red)},
|
||||
tmkv.Pair{Key: types.GetDelegationKey(delAddr1, valAddr1), Value: cdc.MustMarshalBinaryBare(del)},
|
||||
tmkv.Pair{Key: types.GetUBDKey(delAddr1, valAddr1), Value: cdc.MustMarshalBinaryBare(ubd)},
|
||||
tmkv.Pair{Key: types.GetREDKey(delAddr1, valAddr1, valAddr1), Value: cdc.MustMarshalBinaryBare(red)},
|
||||
tmkv.Pair{Key: []byte{0x99}, Value: []byte{0x99}},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user