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:
Kleissner
2021-10-17 17:40:22 +02:00
parent 4d3caaf567
commit 1b93eac17a
7 changed files with 27 additions and 23 deletions

View File

@@ -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
}