aboutsummaryrefslogtreecommitdiffstats
path: root/eth/sync.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-06-09 19:56:27 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-06-09 19:56:27 +0800
commitf86707713c42da02b70a3a389684e19e902d8759 (patch)
tree0eb22642f83961147bfef44453b9398bd5409cfd /eth/sync.go
parent44147d057dd91d8b35dd6f4ed025bdb4baf225eb (diff)
downloadgo-tangerine-f86707713c42da02b70a3a389684e19e902d8759.tar
go-tangerine-f86707713c42da02b70a3a389684e19e902d8759.tar.gz
go-tangerine-f86707713c42da02b70a3a389684e19e902d8759.tar.bz2
go-tangerine-f86707713c42da02b70a3a389684e19e902d8759.tar.lz
go-tangerine-f86707713c42da02b70a3a389684e19e902d8759.tar.xz
go-tangerine-f86707713c42da02b70a3a389684e19e902d8759.tar.zst
go-tangerine-f86707713c42da02b70a3a389684e19e902d8759.zip
eth: fix data race accessing peer.td
Diffstat (limited to 'eth/sync.go')
-rw-r--r--eth/sync.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/eth/sync.go b/eth/sync.go
index b3184364f..3a33fe149 100644
--- a/eth/sync.go
+++ b/eth/sync.go
@@ -208,7 +208,7 @@ func (pm *ProtocolManager) synchronise(peer *peer) {
return
}
// Make sure the peer's TD is higher than our own. If not drop.
- if peer.td.Cmp(pm.chainman.Td()) <= 0 {
+ if peer.Td().Cmp(pm.chainman.Td()) <= 0 {
return
}
// FIXME if we have the hash in our chain and the TD of the peer is