File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import (
15
15
"github.com/ethereum/go-ethereum/ethdb"
16
16
"github.com/ethereum/go-ethereum/event"
17
17
"github.com/ethereum/go-ethereum/internal/shutdowncheck"
18
+ "github.com/ethereum/go-ethereum/log"
18
19
"github.com/ethereum/go-ethereum/node"
19
20
"github.com/ethereum/go-ethereum/rpc"
20
21
)
@@ -128,7 +129,16 @@ func (b *Backend) updateFilterMapsHeads() {
128
129
headEventCh := make (chan core.ChainEvent , 10 )
129
130
blockProcCh := make (chan bool , 10 )
130
131
sub := b .arb .BlockChain ().SubscribeChainEvent (headEventCh )
132
+ if sub == nil {
133
+ log .Error ("arbitrum Backend: failed subscribing to Head Event" )
134
+ return
135
+ }
131
136
sub2 := b .arb .BlockChain ().SubscribeBlockProcessingEvent (blockProcCh )
137
+ if sub2 == nil {
138
+ log .Error ("arbitrum Backend: failed subscribing to Block Processing Event" )
139
+ sub .Unsubscribe ()
140
+ return
141
+ }
132
142
defer func () {
133
143
sub .Unsubscribe ()
134
144
sub2 .Unsubscribe ()
You can’t perform that action at this time.
0 commit comments