mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-24 06:25:55 +00:00
23 lines
583 B
Go
23 lines
583 B
Go
package appmessage
|
|
|
|
// MsgReject implements the Message interface and represents a c4ex
|
|
// Reject message. It is used to notify peers why they are banned.
|
|
type MsgReject struct {
|
|
baseMessage
|
|
Reason string
|
|
}
|
|
|
|
// Command returns the protocol command string for the message. This is part
|
|
// of the Message interface implementation.
|
|
func (msg *MsgReject) Command() MessageCommand {
|
|
return CmdReject
|
|
}
|
|
|
|
// NewMsgReject returns a new c4ex Reject message that conforms to the
|
|
// Message interface.
|
|
func NewMsgReject(reason string) *MsgReject {
|
|
return &MsgReject{
|
|
Reason: reason,
|
|
}
|
|
}
|