@@ -20,7 +20,6 @@ import (
2020 "context"
2121 "errors"
2222 "github.com/CortexFoundation/CortexTheseus/common"
23- "github.com/CortexFoundation/CortexTheseus/common/hexutil"
2423 "github.com/CortexFoundation/CortexTheseus/common/mclock"
2524 "github.com/CortexFoundation/CortexTheseus/log"
2625 "github.com/CortexFoundation/CortexTheseus/metrics"
@@ -39,12 +38,6 @@ import (
3938 "time"
4039)
4140
42- const (
43- batch = 4096 * 2 //params.SyncBatch
44- delay = 12 //params.Delay
45- timeout = 30 * time .Second
46- )
47-
4841var (
4942 rpcBlockMeter = metrics .NewRegisteredMeter ("torrent/block/call" , nil )
5043 rpcCurrentMeter = metrics .NewRegisteredMeter ("torrent/current/call" , nil )
@@ -508,25 +501,6 @@ func (m *Monitor) syncLatestBlock() {
508501 }
509502}
510503
511- func (m * Monitor ) currentBlock () (uint64 , bool , error ) {
512- var (
513- currentNumber hexutil.Uint64
514- update bool
515- )
516-
517- rpcCurrentMeter .Mark (1 )
518- if err := m .cl .Call (& currentNumber , "ctxc_blockNumber" ); err != nil {
519- log .Error ("Call ipc method ctxc_blockNumber failed" , "error" , err )
520- return m .currentNumber .Load (), false , err
521- }
522- if m .currentNumber .Load () != uint64 (currentNumber ) {
523- m .currentNumber .Store (uint64 (currentNumber ))
524- update = true
525- }
526-
527- return uint64 (currentNumber ), update , nil
528- }
529-
530504func (m * Monitor ) skip (i uint64 ) bool {
531505 if m .srv .Load () != SRV_MODEL {
532506 return false
0 commit comments