Skip to content

Commit

Permalink
Fix anoncreds upgrade function
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Costanzo <ian@anon-solutions.ca>
  • Loading branch information
ianco committed Dec 19, 2024
1 parent 81d0d86 commit e957bf6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions acapy_agent/wallet/anoncreds_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ async def get_rev_reg_def_upgrade_objs(
key=lambda x: json.loads(x.value)["created_at"],
)
found_active = False
is_active = False
for askar_issuer_rev_reg_def in askar_issuer_rev_reg_def_records:
# active rev reg def is the oldest non-full and active rev reg def
if (
Expand Down
6 changes: 3 additions & 3 deletions scenarios/examples/restart_anoncreds_upgrade/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def start_new_container(
return (new_agent_container, new_agent_id)


def stop_and_remove_container(agent_id):
def stop_and_remove_container(client, agent_id):
# cleanup - shut down agent (not part of docker compose)
print(">>> shut down agent ...")
agent_container = client.containers.get(agent_id)
Expand Down Expand Up @@ -313,10 +313,10 @@ async def main():
finally:
if alice_id and new_alice_container:
# cleanup - shut down alice agent (not part of docker compose)
stop_and_remove_container(alice_id)
stop_and_remove_container(client, alice_id)
if bob_id and new_bob_container:
# cleanup - shut down bob agent (not part of docker compose)
stop_and_remove_container(bob_id)
stop_and_remove_container(client, bob_id)


if __name__ == "__main__":
Expand Down

0 comments on commit e957bf6

Please sign in to comment.