fix comment on wrap/unwrap

This commit is contained in:
William Banfield
2022-10-24 16:38:32 -04:00
parent d3920fec1d
commit 72c0e6653d

View File

@@ -16,10 +16,9 @@ type Envelope struct {
ChannelID byte
}
// Wrapper is a Protobuf message that can contain a variety of inner messages
// (e.g. via oneof fields). If a Channel's message type implements Wrapper, the
// Router will automatically wrap outbound messages and unwrap inbound messages,
// such that reactors do not have to do this themselves.
// Unwrapper is a Protobuf message that can contain a variety of inner messages
// (e.g. via oneof fields). If a Channel's message type implements Unwrapper, the
// p2p layer will automatically unwrap inbound messages so that reactors do not have to do this themselves.
type Unwrapper interface {
proto.Message
@@ -27,6 +26,7 @@ type Unwrapper interface {
Unwrap() (proto.Message, error)
}
// Wrapper is a companion type to Unwrapper. It is a Protobuf message that can contain a variety of inner messages. The p2p layer will automatically wrap outbound messages so that the reactors do not have to do it themselves.
type Wrapper interface {
proto.Message