Skip to content

Commit

Permalink
merge latest from upstream
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Hardman <[email protected]>
  • Loading branch information
dhh1128 committed Jul 20, 2023
2 parents c6eccea + 4185296 commit 3e7b427
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/keri/app/delegating.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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")

Expand Down
4 changes: 2 additions & 2 deletions src/keri/app/grouping.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 3 additions & 1 deletion src/keri/app/httping.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def __init__(self):
doers = [doing.doify(self.clientDo)]
super(Clienter, self).__init__(doers=doers)

def request(self, method, url):
def request(self, method, url, body=None, headers=None):
purl = parse.urlparse(url)

client = http.clienting.Client(scheme=purl.scheme,
Expand All @@ -230,6 +230,8 @@ def request(self, method, url):
method=method,
path=f"{purl.path}?{purl.query}",
qargs=None,
headers=headers,
body=body
)

clientDoer = http.clienting.ClientDoer(client=client)
Expand Down

0 comments on commit 3e7b427

Please sign in to comment.