mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-20 03:47:50 +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:
@@ -207,7 +207,8 @@ func autoMulticastBroadcast() {
|
||||
// contactArbitraryPeer contacts a new arbitrary peer for the first time.
|
||||
func contactArbitraryPeer(publicKey *btcec.PublicKey, address *net.UDPAddr, receiverPortInternal uint16) (contacted bool) {
|
||||
findSelf := ShouldSendFindSelf()
|
||||
packets := msgEncodeAnnouncement(true, findSelf, nil, nil, nil)
|
||||
_, blockchainHeight, blockchainVersion := UserBlockchain.Header()
|
||||
packets := msgEncodeAnnouncement(true, findSelf, nil, nil, nil, FeatureSupport(), blockchainHeight, blockchainVersion)
|
||||
if len(packets) == 0 || packets[0].err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user