eth/sync_pow.go — Version Comparison
|
v1.16.8 |
v1.17.3 |
| Branch |
etc/v1.16.8-full-node |
etc/v1.17.3-full-node |
| Delta |
+215 -0 |
+216 -0 |
Diff between branches
diff --git a/eth/sync_pow.go b/eth/sync_pow.go
index 56726cba9..5a2f7b68b 100644
--- a/eth/sync_pow.go
+++ b/eth/sync_pow.go
@@ -23,6 +23,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/eth/downloader"
+ "github.com/ethereum/go-ethereum/eth/ethconfig"
"github.com/ethereum/go-ethereum/eth/protocols/eth"
"github.com/ethereum/go-ethereum/log"
)
@@ -155,7 +156,7 @@ func peerToSyncOp(mode downloader.SyncMode, p *eth.Peer) *chainSyncOp {
func (cs *chainSyncer) modeAndLocalHead() (downloader.SyncMode, *big.Int) {
// If we're in snap sync mode, return that directly
- if cs.handler.snapSync.Load() {
+ if cs.handler.downloader.ConfigSyncMode() == ethconfig.SnapSync {
block := cs.handler.chain.CurrentSnapBlock()
td := cs.handler.chain.GetTd(block.Hash(), block.Number.Uint64())
return downloader.SnapSync, td
← Back to Version Comparison