mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-21 13:36:42 +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
19 lines
373 B
Go
19 lines
373 B
Go
package protowire
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/domainmessage"
|
|
)
|
|
|
|
func (x *KaspadMessage_Ping) toDomainMessage() (domainmessage.Message, error) {
|
|
return &domainmessage.MsgPing{
|
|
Nonce: x.Ping.Nonce,
|
|
}, nil
|
|
}
|
|
|
|
func (x *KaspadMessage_Ping) fromDomainMessage(msgPing *domainmessage.MsgPing) error {
|
|
x.Ping = &PingMessage{
|
|
Nonce: msgPing.Nonce,
|
|
}
|
|
return nil
|
|
}
|