Skip to content

Commit 3cb74c7

Browse files
committed
log fix
1 parent 6852ee3 commit 3cb74c7

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

monitor.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,13 @@ func New(flag *params.Config, cache, compress, listen bool, callback chan any) (
115115
//taskCh: make(chan *types.Block, batch),
116116
//start: mclock.Now(),
117117
}
118-
fs_, err := backend.NewChainDB(flag)
119-
if err != nil {
118+
119+
if fs_, err := backend.NewChainDB(flag); err != nil {
120120
log.Error("file storage failed", "err", err)
121121
return nil, err
122+
} else {
123+
m.fs = fs_
122124
}
123-
m.fs = fs_
124125
m.lastNumber.Store(0)
125126
m.currentNumber.Store(0)
126127
m.terminated.Store(false)
@@ -290,7 +291,6 @@ func (m *Monitor) indexInit() error {
290291

291292
// SetConnection method builds connection to remote or local communicator.
292293
func (m *Monitor) buildConnection(ipcpath string, rpcuri string) (*rpc.Client, error) {
293-
294294
log.Debug("Building connection", "terminated", m.terminated.Load())
295295

296296
if len(ipcpath) > 0 {
@@ -311,7 +311,7 @@ func (m *Monitor) buildConnection(ipcpath string, rpcuri string) (*rpc.Client, e
311311
}
312312
}
313313
} else {
314-
log.Warn("IPC is empty")
314+
log.Warn("IPC is empty, try remote RPC instead")
315315
}
316316

317317
cl, err := rpc.Dial(rpcuri)

0 commit comments

Comments
 (0)