From 3c910849fd14cb3f6681fc0cadab3a30da962aea Mon Sep 17 00:00:00 2001
From: Benjamin Wenger <ben@elixxir.ioo>
Date: Thu, 1 Sep 2022 15:36:15 -0700
Subject: [PATCH] fixed a bug in broadcast and fixed missing functions on the
 interface

---
 broadcast/processor.go | 2 +-
 channels/interface.go  | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/broadcast/processor.go b/broadcast/processor.go
index 651974c4c..3c3557347 100644
--- a/broadcast/processor.go
+++ b/broadcast/processor.go
@@ -56,7 +56,7 @@ func (p *processor) Process(msg format.Message,
 		jww.ERROR.Printf("Unrecognized broadcast method %d", p.method)
 	}
 
-	go p.cb(payload, receptionID, round)
+	p.cb(payload, receptionID, round)
 }
 
 // String returns a string identifying the symmetricProcessor for debugging purposes.
diff --git a/channels/interface.go b/channels/interface.go
index efbf26b56..219857e43 100644
--- a/channels/interface.go
+++ b/channels/interface.go
@@ -25,6 +25,15 @@ import (
 var ValidForever = time.Duration(math.MaxInt64)
 
 type Manager interface {
+
+	// JoinChannel joins the given channel. It will fail if the channel has
+	// already been joined.
+	JoinChannel(channel *cryptoBroadcast.Channel) error
+
+	// LeaveChannel leaves the given channel. It will return an error if the
+	// channel was not previously joined.
+	LeaveChannel(channelID *id.ID) error
+
 	// SendGeneric is used to send a raw message over a channel. In general, it
 	// should be wrapped in a function which defines the wire protocol
 	// If the final message, before being sent over the wire, is too long, this will
-- 
GitLab