aboutsummaryrefslogtreecommitdiffstats
path: root/eth/handler.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-06-16 23:14:52 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-06-18 20:56:08 +0800
commit11c8f83a583745b01a4c06cdd29529af1df364f6 (patch)
treed60e6c0b8bca9418b432feb597295e23e1951466 /eth/handler.go
parent057bc237adf9ed0adf615a72cc1e92d9aed15d9e (diff)
downloadgo-tangerine-11c8f83a583745b01a4c06cdd29529af1df364f6.tar
go-tangerine-11c8f83a583745b01a4c06cdd29529af1df364f6.tar.gz
go-tangerine-11c8f83a583745b01a4c06cdd29529af1df364f6.tar.bz2
go-tangerine-11c8f83a583745b01a4c06cdd29529af1df364f6.tar.lz
go-tangerine-11c8f83a583745b01a4c06cdd29529af1df364f6.tar.xz
go-tangerine-11c8f83a583745b01a4c06cdd29529af1df364f6.tar.zst
go-tangerine-11c8f83a583745b01a4c06cdd29529af1df364f6.zip
eth, eth/fetcher: cache future propagated blocks too
Diffstat (limited to 'eth/handler.go')
-rw-r--r--eth/handler.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/eth/handler.go b/eth/handler.go
index e5908dc88..604983a7b 100644
--- a/eth/handler.go
+++ b/eth/handler.go
@@ -340,6 +340,8 @@ func (self *ProtocolManager) handleMsg(p *peer) error {
}
request.Block.ReceivedAt = msg.ReceivedAt
+ // Try to import the propagated block, also making it fill any fetcher gaps
+ self.fetcher.Enqueue(p.id, request.Block)
if err := self.importBlock(p, request.Block, request.TD); err != nil {
return err
}