Update interfaces.go

This commit is contained in:
0xFloki 2025-12-09 23:23:18 +01:00 committed by GitHub
parent e58c785424
commit 503729e3f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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