mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-09-13 13:00:10 +00:00

* [NOD-1225] Rename wire to domainmessage * [NOD-1225] Get rid of references to package wire in the code, and get rid of InvType
27 lines
805 B
Go
27 lines
805 B
Go
package domainmessage
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/util/daghash"
|
|
)
|
|
|
|
// MsgInvRelayBlock implements the Message interface and represents a kaspa
|
|
// block inventory message. It is used to notify the network about new block
|
|
// by sending their hash, and let the receiving node decide if it needs it.
|
|
type MsgInvRelayBlock struct {
|
|
Hash *daghash.Hash
|
|
}
|
|
|
|
// Command returns the protocol command string for the message. This is part
|
|
// of the Message interface implementation.
|
|
func (msg *MsgInvRelayBlock) Command() MessageCommand {
|
|
return CmdInvRelayBlock
|
|
}
|
|
|
|
// NewMsgInvBlock returns a new kaspa invrelblk message that conforms to
|
|
// the Message interface. See MsgInvRelayBlock for details.
|
|
func NewMsgInvBlock(hash *daghash.Hash) *MsgInvRelayBlock {
|
|
return &MsgInvRelayBlock{
|
|
Hash: hash,
|
|
}
|
|
}
|