mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-24 14:35:53 +00:00
28 lines
858 B
Go
28 lines
858 B
Go
package appmessage
|
|
|
|
import (
|
|
"github.com/c4ei/YunSeokYeol/domain/consensus/model/externalapi"
|
|
)
|
|
|
|
// 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 {
|
|
baseMessage
|
|
Hash *externalapi.DomainHash
|
|
}
|
|
|
|
// 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 *externalapi.DomainHash) *MsgInvRelayBlock {
|
|
return &MsgInvRelayBlock{
|
|
Hash: hash,
|
|
}
|
|
}
|