6
6
"sync"
7
7
"time"
8
8
9
- "github.com/ethereum/go-ethereum/pow"
10
9
"github.com/ethereum/go-ethereum/common"
11
10
"github.com/ethereum/go-ethereum/core"
12
11
"github.com/ethereum/go-ethereum/core/types"
@@ -16,6 +15,7 @@ import (
16
15
"github.com/ethereum/go-ethereum/logger"
17
16
"github.com/ethereum/go-ethereum/logger/glog"
18
17
"github.com/ethereum/go-ethereum/p2p"
18
+ "github.com/ethereum/go-ethereum/pow"
19
19
"github.com/ethereum/go-ethereum/rlp"
20
20
)
21
21
@@ -307,7 +307,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
307
307
blocks = nil
308
308
}
309
309
// Update the receive timestamp of each block
310
- for i := 0 ; i < len (blocks ); i ++ {
310
+ for i := 0 ; i < len (blocks ); i ++ {
311
311
blocks [i ].ReceivedAt = msg .ReceivedAt
312
312
}
313
313
// Filter out any explicitly requested blocks, deliver the rest to the downloader
@@ -417,8 +417,8 @@ func (self *ProtocolManager) minedBroadcastLoop() {
417
417
for obj := range self .minedBlockSub .Chan () {
418
418
switch ev := obj .(type ) {
419
419
case core.NewMinedBlockEvent :
420
- self .BroadcastBlock (ev .Block , false )
421
- self .BroadcastBlock (ev .Block , true )
420
+ self .BroadcastBlock (ev .Block , true ) // First propagate block to peers
421
+ self .BroadcastBlock (ev .Block , false ) // Only then announce to the rest
422
422
}
423
423
}
424
424
}
0 commit comments