GetProtocolVersions¶
NEW-ETC — no upstream or core-geth original.
| File | protocol_pow.go |
| Symbol | GetProtocolVersions |
| Ref | etc/v1.17.3-full-node |
NEW-ETC: replaces the static
var ProtocolVersions = []uint{ETH69, ETH68}(upstream, before #33511 dropped ETH68) with a function that filters by consensus type — PoW advertises ETH68 (needed for NewBlock), PoS only ETH69. Genuinely new (var → func), so no single pre-purge symbol to diff against.
// GetProtocolVersions returns the eth protocol versions to advertise based
// on chain type. Perpetual PoW chains only speak ETH68 (the last version
// that still carries TD in the handshake); other chains speak the upstream
// set.
func GetProtocolVersions(isPow bool) []uint {
if isPow {
return []uint{ETH68} // Only ETH68 for PoW (has TD in handshake)
}
return ProtocolVersions // Normal: ETH70, ETH69
}