chore: update schema to v0.2.0 in all go.mod's (backport #21488) (#21491)

Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot]
2024-08-30 23:44:56 +02:00
committed by GitHub
co-authored by Julien Robert
parent e3c86d1537
commit 5d2fcfa65b
53 changed files with 95 additions and 87 deletions
+16 -8
View File
@@ -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