From 72c0e6653d8640fd6bc46f74f848014f18f110a3 Mon Sep 17 00:00:00 2001 From: William Banfield Date: Mon, 24 Oct 2022 16:38:32 -0400 Subject: [PATCH] fix comment on wrap/unwrap --- p2p/types.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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