diff --git a/src/keri/app/delegating.py b/src/keri/app/delegating.py index 094e859c8..75624f616 100644 --- a/src/keri/app/delegating.py +++ b/src/keri/app/delegating.py @@ -29,7 +29,7 @@ class Boatswain(doing.DoDoer): """ - def __init__(self, hby, **kwa): + def __init__(self, hby, proxy=None, **kwa): """ For the current event, gather the current set of witnesses, send the event, gather all receipts and send them to all other witnesses @@ -45,6 +45,7 @@ def __init__(self, hby, **kwa): self.postman = forwarding.Poster(hby=hby) self.witq = agenting.WitnessInquisitor(hby=hby) self.witDoer = agenting.Receiptor(hby=self.hby) + self.proxy = proxy super(Boatswain, self).__init__(doers=[self.witq, self.witDoer, self.postman, doing.doify(self.escrowDo)], **kwa) @@ -75,6 +76,8 @@ def delegation(self, pre, sn=None, proxy=None): phab = hab elif proxy is not None: phab = proxy + elif self.proxy is not None: + phab = self.proxy else: raise kering.ValidationError("no proxy to send messages for delegation") diff --git a/src/keri/app/grouping.py b/src/keri/app/grouping.py index 1768d8b2f..08a1490c8 100644 --- a/src/keri/app/grouping.py +++ b/src/keri/app/grouping.py @@ -23,10 +23,10 @@ class Counselor(doing.DoDoer): - def __init__(self, hby, **kwa): + def __init__(self, hby, swain=None, **kwa): self.hby = hby - self.swain = delegating.Boatswain(hby=self.hby) + self.swain = swain if swain is not None else delegating.Boatswain(hby=self.hby) self.witDoer = agenting.Receiptor(hby=self.hby) self.witq = agenting.WitnessInquisitor(hby=hby)