From a53ef84c540f27b506e4d1fd4850caa4137b2694 Mon Sep 17 00:00:00 2001 From: Philip Feairheller Date: Sat, 30 Sep 2023 07:19:39 -0700 Subject: [PATCH] Update to message forwarding to honor all non-witness end roles (#581) Signed-off-by: pfeairheller --- src/keri/app/forwarding.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/keri/app/forwarding.py b/src/keri/app/forwarding.py index 8e97c3c75..8ba5e2ce5 100644 --- a/src/keri/app/forwarding.py +++ b/src/keri/app/forwarding.py @@ -155,15 +155,15 @@ def sendEvent(self, hab, fn=0): yield self.tock def sendDirect(self, hab, ends, serder, atc): - ctrl, locs = random.choice(list(ends.items())) - witer = agenting.messengerFrom(hab=hab, pre=ctrl, urls=locs) + for ctrl, locs in ends.items(): + witer = agenting.messengerFrom(hab=hab, pre=ctrl, urls=locs) - msg = bytearray(serder.raw) - if atc is not None: - msg.extend(atc) + msg = bytearray(serder.raw) + if atc is not None: + msg.extend(atc) - witer.msgs.append(bytearray(msg)) # make a copy - self.extend([witer]) + witer.msgs.append(bytearray(msg)) # make a copy + self.extend([witer]) while not witer.idle: _ = (yield self.tock)