fix(x/staking): Add missing data from import/export (#20953)

This commit is contained in:
Facundo Medica
2024-07-15 13:01:08 +00:00
committed by GitHub
parent 3395906d1c
commit f61141f15e
9 changed files with 3483 additions and 1116 deletions
+14
View File
@@ -69,6 +69,20 @@ func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string {
cdc.MustUnmarshal(kvB.Value, &paramsB)
return fmt.Sprintf("%v\n%v", paramsA, paramsB)
case bytes.Equal(kvA.Key[:1], types.ValidatorConsPubKeyRotationHistoryKey):
var historyA, historyB types.ConsPubKeyRotationHistory
cdc.MustUnmarshal(kvA.Value, &historyA)
cdc.MustUnmarshal(kvB.Value, &historyB)
return fmt.Sprintf("%v\n%v", historyA, historyB)
case bytes.Equal(kvA.Key[:1], types.ValidatorConsensusKeyRotationRecordQueueKey):
var historyA, historyB types.ValAddrsOfRotatedConsKeys
cdc.MustUnmarshal(kvA.Value, &historyA)
cdc.MustUnmarshal(kvB.Value, &historyB)
return fmt.Sprintf("%v\n%v", historyA, historyB)
default:
panic(fmt.Sprintf("invalid staking key prefix %X", kvA.Key[:1]))
}