Skip to content

Commit

Permalink
Update query cues to use hex string instead of int for sequence numbe…
Browse files Browse the repository at this point in the history
…r. (WebOfTrust#659)

Signed-off-by: pfeairheller <[email protected]>
  • Loading branch information
pfeairheller authored Jan 16, 2024
1 parent 626aae9 commit 46efdae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/keri/app/querying.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def __init__(self, hby, hab, pre, sn, **opts):
self.pre = pre
self.sn = sn
self.witq = agenting.WitnessInquisitor(hby=self.hby)
self.witq.query(src=self.hab.pre, pre=self.pre, sn=self.sn)
self.witq.query(src=self.hab.pre, pre=self.pre, sn="{:x}".format(self.sn))
super(SeqNoQuerier, self).__init__(doers=[self.witq], **opts)

def recur(self, tyme, deeds=None):
Expand Down
2 changes: 1 addition & 1 deletion src/keri/core/eventing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2333,7 +2333,7 @@ def valSigsDelWigs(self, serder, sigers, verfers, tholder,
if self.escrowPWEvent(serder=serder, wigers=wigers, sigers=sigers,
seqner=delseqner, saider=delsaider):
# cue to query for witness receipts
self.cues.push(dict(kin="query", q=dict(pre=serder.pre, sn=serder.sn)))
self.cues.push(dict(kin="query", q=dict(pre=serder.pre, sn=serder.snh)))
raise MissingWitnessSignatureError(f"Failure satisfying toad={toader.num} "
f"on witness sigs="
f"{[siger.qb64 for siger in wigers]} "
Expand Down
4 changes: 2 additions & 2 deletions src/keri/peer/exchanging.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def processEvent(self, serder, tsgs=None, cigars=None, **kwargs):

if prefixer.qb64 not in self.kevers or self.kevers[prefixer.qb64].sn < seqner.sn:
if self.escrowPSEvent(serder=serder, tsgs=tsgs, pathed=pathed):
self.cues.append(dict(kin="query", q=dict(r="logs", pre=prefixer.qb64, sn=seqner.sn)))
self.cues.append(dict(kin="query", q=dict(r="logs", pre=prefixer.qb64, sn=seqner.snh)))
raise MissingSignatureError(f"Unable to find sender {prefixer.qb64} in kevers"
f" for evt = {serder.ked}.")

Expand All @@ -91,7 +91,7 @@ def processEvent(self, serder, tsgs=None, cigars=None, **kwargs):

if not tholder.satisfy(indices): # We still don't have all the sigers, need to escrow
if self.escrowPSEvent(serder=serder, tsgs=tsgs, pathed=pathed):
self.cues.append(dict(kin="query", q=dict(r="logs", pre=prefixer.qb64, sn=seqner.sn)))
self.cues.append(dict(kin="query", q=dict(r="logs", pre=prefixer.qb64, sn=seqner.snh)))
raise MissingSignatureError(f"Not enough signatures in {indices}"
f" for evt = {serder.ked}.")

Expand Down

0 comments on commit 46efdae

Please sign in to comment.