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

@@ -136,7 +136,8 @@ func (network *Network) MulticastIPv6Listen() {
// MulticastIPv6Send sends out a single multicast messages to discover peers at the same site
func (network *Network) MulticastIPv6Send() (err error) {
packets := msgEncodeAnnouncement(true, true, nil, nil, nil)
_, blockchainHeight, blockchainVersion := UserBlockchain.Header()
packets := msgEncodeAnnouncement(true, true, nil, nil, nil, FeatureSupport(), blockchainHeight, blockchainVersion)
if len(packets) == 0 || packets[0].err != nil {
return packets[0].err
}