hotfix migration
should have just kept the full copy-pasted dbseq init
This commit is contained in:
parent
80ed54378c
commit
18d26071d8
|
@ -259,13 +259,13 @@ proc loadImmutableValidators(db: BeaconChainDB): seq[ImmutableValidatorData] =
|
||||||
|
|
||||||
proc copyDbSeq[T](db0, db: SqStoreRef, name: string) =
|
proc copyDbSeq[T](db0, db: SqStoreRef, name: string) =
|
||||||
var
|
var
|
||||||
src = DbSeq[T].init(db0, "genesis_deposits")
|
src = DbSeq[T].init(db0, name)
|
||||||
|
|
||||||
if src.isErr():
|
if src.isErr():
|
||||||
debug "Skipping migration", name, msg = src.error()
|
debug "Skipping migration", name, msg = src.error()
|
||||||
return
|
return
|
||||||
|
|
||||||
var tgt = DbSeq[T].init(db, "genesis_deposits").expectDb()
|
var tgt = DbSeq[T].init(db, name).expectDb()
|
||||||
|
|
||||||
while tgt.len < src.get().len():
|
while tgt.len < src.get().len():
|
||||||
tgt.add src.get().get(tgt.len())
|
tgt.add src.get().get(tgt.len())
|
||||||
|
|
Loading…
Reference in New Issue