mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
Update interfaces.go
This commit is contained in:
parent
e58c785424
commit
503729e3f4
1 changed files with 3 additions and 4 deletions
|
|
@ -145,10 +145,9 @@ type SyncProgress struct {
|
||||||
|
|
||||||
// Done returns the indicator if the initial sync is finished or not.
|
// Done returns the indicator if the initial sync is finished or not.
|
||||||
func (prog SyncProgress) Done() bool {
|
func (prog SyncProgress) Done() bool {
|
||||||
if prog.CurrentBlock < prog.HighestBlock {
|
return prog.CurrentBlock >= prog.HighestBlock &&
|
||||||
return false
|
prog.TxIndexRemainingBlocks == 0 &&
|
||||||
}
|
prog.StateIndexRemaining == 0
|
||||||
return prog.TxIndexRemainingBlocks == 0 && prog.StateIndexRemaining == 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChainSyncReader wraps access to the node's current sync status. If there's no
|
// ChainSyncReader wraps access to the node's current sync status. If there's no
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue