mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
cmd, eth, les: 16400 Fixed formatting issues
This commit is contained in:
parent
136e27ba36
commit
6d1305bdd9
3 changed files with 9 additions and 8 deletions
|
|
@ -340,7 +340,7 @@ func startNode(ctx *cli.Context, stack *node.Node) {
|
|||
if err := stack.Service(&lightEthereum); err != nil {
|
||||
utils.Fatalf("LightEthereum service not running: %v", err)
|
||||
}
|
||||
<-lightEthereum.Downloader().SyncedCh
|
||||
<-lightEthereum.Downloader().syncedCh
|
||||
log.Info("Synchronisation completed, exitting", "countdown", exitWhenSynced)
|
||||
time.Sleep(exitWhenSynced)
|
||||
stack.Stop()
|
||||
|
|
@ -351,7 +351,7 @@ func startNode(ctx *cli.Context, stack *node.Node) {
|
|||
if err := stack.Service(ðereum); err != nil {
|
||||
utils.Fatalf("Ethereum service not running: %v", err)
|
||||
}
|
||||
<-ethereum.Downloader().SyncedCh
|
||||
<-ethereum.Downloader().syncedCh
|
||||
log.Info("Synchronisation completed, exitting", "countdown", exitWhenSynced)
|
||||
time.Sleep(exitWhenSynced)
|
||||
stack.Stop()
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ type Downloader struct {
|
|||
bodyWakeCh chan bool // [eth/62] Channel to signal the block body fetcher of new tasks
|
||||
receiptWakeCh chan bool // [eth/63] Channel to signal the receipt fetcher of new tasks
|
||||
headerProcCh chan []*types.Header // [eth/62] Channel to feed the header processor new tasks
|
||||
SyncedCh chan bool
|
||||
syncedCh chan bool
|
||||
|
||||
// for stateFetcher
|
||||
stateSyncStart chan *stateSync
|
||||
|
|
@ -227,7 +227,7 @@ func New(mode SyncMode, stateDb ethdb.Database, mux *event.TypeMux, chain BlockC
|
|||
syncStatsState: stateSyncStats{
|
||||
processed: rawdb.ReadFastTrieProgress(stateDb),
|
||||
},
|
||||
SyncedCh: make(chan bool, 1),
|
||||
syncedCh: make(chan bool, 1),
|
||||
trackStateReq: make(chan *stateReq),
|
||||
}
|
||||
go dl.qosTuner()
|
||||
|
|
@ -320,7 +320,7 @@ func (d *Downloader) Synchronise(id string, head common.Hash, td *big.Int, mode
|
|||
switch err {
|
||||
case nil:
|
||||
select {
|
||||
case d.SyncedCh <- true:
|
||||
case d.syncedCh <- true:
|
||||
default:
|
||||
}
|
||||
case errBusy:
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ type lightFetcher struct {
|
|||
lastUpdateStats *updateStatsEntry
|
||||
syncing bool
|
||||
syncDone chan *peer
|
||||
SyncedCh chan bool
|
||||
syncedCh chan bool
|
||||
|
||||
reqMu sync.RWMutex // reqMu protects access to sent header fetch requests
|
||||
requested map[uint64]fetchRequest
|
||||
deliverChn chan fetchResponse
|
||||
|
|
@ -116,7 +117,7 @@ func newLightFetcher(pm *ProtocolManager) *lightFetcher {
|
|||
timeoutChn: make(chan uint64),
|
||||
requestChn: make(chan bool, 100),
|
||||
syncDone: make(chan *peer),
|
||||
SyncedCh: make(chan bool, 1),
|
||||
syncedCh: make(chan bool, 1),
|
||||
maxConfirmedTd: big.NewInt(0),
|
||||
}
|
||||
pm.peers.notify(f)
|
||||
|
|
@ -447,7 +448,7 @@ func (f *lightFetcher) nextRequest() (*distReq, uint64) {
|
|||
p.Log().Debug("Synchronisation started")
|
||||
f.pm.synchronise(p)
|
||||
f.syncDone <- p
|
||||
f.SyncedCh <- true
|
||||
f.syncedCh <- true
|
||||
}()
|
||||
return nil
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue