File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -727,8 +727,8 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
727
727
// Schedule a sync if above ours. Note, this will not fire a sync for a gap of
728
728
// a single block (as the true TD is below the propagated block), however this
729
729
// scenario should easily be covered by the fetcher.
730
- currentBlock := pm .blockchain .CurrentBlock ()
731
- if trueTD .Cmp (pm .blockchain .GetTd (currentBlock .Hash (), currentBlock . NumberU64 ())) > 0 {
730
+ currentHeader := pm .blockchain .CurrentHeader ()
731
+ if trueTD .Cmp (pm .blockchain .GetTd (currentHeader .Hash (), currentHeader . Number . Uint64 ())) > 0 {
732
732
go pm .synchronise (p )
733
733
}
734
734
}
Original file line number Diff line number Diff line change @@ -189,8 +189,8 @@ func (pm *ProtocolManager) synchronise(peer *peer) {
189
189
return
190
190
}
191
191
// Make sure the peer's TD is higher than our own
192
- currentBlock := pm .blockchain .CurrentBlock ()
193
- td := pm .blockchain .GetTd (currentBlock .Hash (), currentBlock . NumberU64 ())
192
+ currentHeader := pm .blockchain .CurrentHeader ()
193
+ td := pm .blockchain .GetTd (currentHeader .Hash (), currentHeader . Number . Uint64 ())
194
194
195
195
pHead , pTd := peer .Head ()
196
196
if pTd .Cmp (td ) <= 0 {
You can’t perform that action at this time.
0 commit comments