Peer.AsyncSendNewBlockHash¶
| Source (upstream pre-purge) | Current | |
|---|---|---|
| File | eth/protocols/eth/peer.go |
peer_pow.go |
| Symbol | Peer.AsyncSendNewBlockHash |
Peer.AsyncSendNewBlockHash |
| Ref | f4d53133f~1 |
etc/v1.17.3-full-node |
3-way merge — purge → getc ← upstream¶
pre-purge≈ adapted (origin inferred by similarity)
↗// AsyncSendNewBlockHash queues the availability of a block for propagation to a
// remote peer. If the peer's broadcast queue is full, the event is silently
// dropped.
func (p *Peer) AsyncSendNewBlockHash(block *types.Block) {
select {
≈ case p.powExt.queuedBlockAnns <- block:
↗ // Mark all the block hash as known, but ensure we don't overflow our limits
≈ p.powExt.knownBlocks.Add(block.Hash())
↗ default:
p.Log().Debug("Dropping block announcement", "number", block.NumberU64(), "hash", block.Hash())
}
}
core-geth validation — +2 -2
| | | |---|---| | File | [`peer.go`](https://github.com/etclabscore/core-geth/blob/v1.12.20/eth/protocols/eth/peer.go) | | Symbol | `Peer.AsyncSendNewBlockHash` | | Ref | `v1.12.20` |--- a/core-geth/eth/protocols/eth/peer.go
+++ b/etc/eth/protocols/eth/peer_pow.go
@@ -3,9 +3,9 @@
// dropped.
func (p *Peer) AsyncSendNewBlockHash(block *types.Block) {
select {
- case p.queuedBlockAnns <- block:
+ case p.powExt.queuedBlockAnns <- block:
// Mark all the block hash as known, but ensure we don't overflow our limits
- p.knownBlocks.Add(block.Hash())
+ p.powExt.knownBlocks.Add(block.Hash())
default:
p.Log().Debug("Dropping block announcement", "number", block.NumberU64(), "hash", block.Hash())
}