Skip to content

Commit f5d4205

Browse files
authored
Merge pull request #1080 from oasisprotocol/ptrus/fix/roflmarket-instance-canceled
analyzer/runtime: Refresh provider on instance canceled event
2 parents df0bf14 + a07c178 commit f5d4205

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.changelog/1080.bugfix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
analyzer/runtime: Refresh provider on instance canceled event

analyzer/runtime/runtime.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,17 @@ func (m *processor) queueRoflmarketStale(batch *storage.QueryBatch, blockData *B
729729
)
730730
}
731731

732+
if e := event.WithScope.RoflMarket.InstanceCancelled; e != nil {
733+
// Queue a refresh of the provider.
734+
// XXX: This could be optimized to only refresh the instance, not the whole provider.
735+
batch.Queue(
736+
queries.RuntimeRoflmarketProviderQueueRefresh,
737+
m.runtime,
738+
e.Provider,
739+
blockData.Header.Round,
740+
)
741+
}
742+
732743
if e := event.WithScope.RoflMarket.InstanceRemoved; e != nil {
733744
// Queue a refresh of the provider.
734745
// XXX: This could be optimized to only refresh the instance, not the whole provider.

0 commit comments

Comments
 (0)