chore: update schema to v0.2.0 in all go.mod's (#21488)
This commit is contained in:
+16
-8
@@ -163,14 +163,16 @@ func (p listenerWrapper) ListenFinalizeBlock(_ context.Context, req abci.Finaliz
|
||||
|
||||
func (p listenerWrapper) ListenCommit(ctx context.Context, res abci.CommitResponse, changeSet []*storetypes.StoreKVPair) error {
|
||||
if cb := p.listener.OnKVPair; cb != nil {
|
||||
updates := make([]appdata.ModuleKVPairUpdate, len(changeSet))
|
||||
updates := make([]appdata.ActorKVPairUpdate, len(changeSet))
|
||||
for i, pair := range changeSet {
|
||||
updates[i] = appdata.ModuleKVPairUpdate{
|
||||
ModuleName: pair.StoreKey,
|
||||
Update: schema.KVPairUpdate{
|
||||
Key: pair.Key,
|
||||
Value: pair.Value,
|
||||
Delete: pair.Delete,
|
||||
updates[i] = appdata.ActorKVPairUpdate{
|
||||
Actor: []byte(pair.StoreKey),
|
||||
StateChanges: []schema.KVPairUpdate{
|
||||
{
|
||||
Key: pair.Key,
|
||||
Value: pair.Value,
|
||||
Remove: pair.Delete,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -181,10 +183,16 @@ func (p listenerWrapper) ListenCommit(ctx context.Context, res abci.CommitRespon
|
||||
}
|
||||
|
||||
if p.listener.Commit != nil {
|
||||
err := p.listener.Commit(appdata.CommitData{})
|
||||
commitCb, err := p.listener.Commit(appdata.CommitData{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if commitCb != nil {
|
||||
err := commitCb()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user