From 8c1e5fb87329d1051560f0395e1e1229390f15ef Mon Sep 17 00:00:00 2001 From: Arshdeep Date: Tue, 9 Apr 2024 19:39:06 -0400 Subject: [PATCH] process only saved credentials during migration - update migrate command to process only saved credentials - while migrating keys, skip missing events Signed-off-by: arshdeep singh --- src/keri/app/cli/commands/migrate.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/keri/app/cli/commands/migrate.py b/src/keri/app/cli/commands/migrate.py index 2116ee267..775f957b9 100644 --- a/src/keri/app/cli/commands/migrate.py +++ b/src/keri/app/cli/commands/migrate.py @@ -114,7 +114,7 @@ def migrate(tymth, tock=0.0, **opts): # ksr = stateFromKever(kever) rgy.states.pin(sad['i'], val=rsr) - for (said,), _ in rgy.creds.getItemIter(): + for (said,), _ in rgy.saved.getItemIter(): snkey = dbing.snKey(said, 0) dig = rgy.getTel(key=snkey) @@ -151,7 +151,8 @@ def migrateKeys(db): for pre, fn, dig in db.getFelItemAllPreIter(key=b''): dgkey = dbing.dgKey(pre, dig) # get message if not (raw := db.getEvt(key=dgkey)): - raise kering.MissingEntryError("Missing event for dig={}.".format(dig)) + print(f"Migrate keys: missing event for dig={dig}, skipped.") + continue serder = serdering.SerderKERI(raw=bytes(raw)) val = (coring.Prefixer(qb64b=serder.preb), coring.Seqner(sn=serder.sn)) verfers = serder.verfers or []