diff --git a/p2p/types.go b/p2p/types.go index 5e5fabf80..48e295a2b 100644 --- a/p2p/types.go +++ b/p2p/types.go @@ -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