Skip to content

Commit 4e9116d

Browse files
committed
Add ResetLatestChainInfo
1 parent 0334e1a commit 4e9116d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

multinode/adaptor.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,14 +279,18 @@ func (m *Adapter[RPC, HEAD]) GetChStopInflight() chan struct{} {
279279
return m.chStopInFlight
280280
}
281281

282-
func (m *Adapter[RPC, HEAD]) Close() {
283-
m.CancelInflightRequests()
284-
m.UnsubscribeAllExcept()
282+
func (m *Adapter[RPC, HEAD]) ResetLatestChainInfo() {
285283
m.chainInfoLock.Lock()
286284
m.latestChainInfo = ChainInfo{}
287285
m.chainInfoLock.Unlock()
288286
}
289287

288+
func (m *Adapter[RPC, HEAD]) Close() {
289+
m.CancelInflightRequests()
290+
m.UnsubscribeAllExcept()
291+
m.ResetLatestChainInfo()
292+
}
293+
290294
func (m *Adapter[RPC, HEAD]) GetInterceptedChainInfo() (latest, highestUserObservations ChainInfo) {
291295
m.chainInfoLock.Lock()
292296
defer m.chainInfoLock.Unlock()

0 commit comments

Comments
 (0)