mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-17 02:47:51 +01:00
Moving FeatureSupport() and UserBlockchain.Header() calls out of Message Encoding.
This paves the way for refactoring the message code into the protocol package.
This commit is contained in:
11
Network.go
11
Network.go
@@ -341,3 +341,14 @@ func (network *Network) SelfReportedPorts() (portI, portE uint16) {
|
||||
|
||||
return portI, portE
|
||||
}
|
||||
|
||||
// FeatureSupport returns supported features by this peer
|
||||
func FeatureSupport() (feature byte) {
|
||||
if countListen4 > 0 {
|
||||
feature |= 1 << FeatureIPv4Listen
|
||||
}
|
||||
if countListen6 > 0 {
|
||||
feature |= 1 << FeatureIPv6Listen
|
||||
}
|
||||
return feature
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user