diff --git a/src/keria/app/agenting.py b/src/keria/app/agenting.py index 658ff95b..97bc802d 100644 --- a/src/keria/app/agenting.py +++ b/src/keria/app/agenting.py @@ -709,7 +709,9 @@ def recur(self, tyme, deeds=None): seqNoDo = querying.SeqNoQuerier(hby=self.hby, hab=self.agentHab, pre=pre, sn=sn) self.extend([seqNoDo]) elif "anchor" in msg: - pass + anchor = msg['anchor'] + anchorDo = querying.AnchorQuerier(hby=self.hby, hab=self.agentHab, pre=pre, anchor=anchor) + self.extend([anchorDo]) else: qryDo = querying.QueryDoer(hby=self.hby, hab=self.agentHab, pre=pre, kvy=self.kvy) self.extend([qryDo]) diff --git a/src/keria/core/longrunning.py b/src/keria/core/longrunning.py index 4d8f2ad5..fa6aad5f 100644 --- a/src/keria/core/longrunning.py +++ b/src/keria/core/longrunning.py @@ -294,7 +294,7 @@ def status(self, op): operation.done = False elif "anchor" in op.metadata: anchor = op.metadata["anchor"] - if self.hby.db.findAnchoringEvent(op.oid, anchor=anchor) is not None: + if self.hby.db.findAnchoringSealEvent(op.oid, seal=anchor) is not None: operation.done = True operation.response = asdict(kever.state()) else: diff --git a/tests/app/test_agenting.py b/tests/app/test_agenting.py index 05600909..d0d6d8df 100644 --- a/tests/app/test_agenting.py +++ b/tests/app/test_agenting.py @@ -381,7 +381,12 @@ def test_querier(helpers): # Anchor not implemented yet qry.queries.append(dict(pre="EI7AkI40M11MS7lkTCb10JC9-nDt-tXwQh44OHAFlv_9", anchor={})) qry.recur(1.0, deeds=deeds) - assert len(qry.doers) == 0 + assert len(qry.doers) == 1 + anchorDoer = qry.doers[0] + assert isinstance(anchorDoer, querying.AnchorQuerier) is True + assert anchorDoer.pre == "EI7AkI40M11MS7lkTCb10JC9-nDt-tXwQh44OHAFlv_9" + assert anchorDoer.anchor == {} + qry.doers.remove(anchorDoer) qry.queries.append(dict(pre="EI7AkI40M11MS7lkTCb10JC9-nDt-tXwQh44OHAFlv_9")) qry.recur(1.0, deeds=deeds)