From 67de2a3a4661adc746cc420fcb17fb6655287917 Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Mon, 23 Nov 2020 11:18:21 +0700 Subject: [PATCH] To mdbx dupfixed (#1371) --- cmd/integration/commands/refetence_db.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/integration/commands/refetence_db.go b/cmd/integration/commands/refetence_db.go index 255acafc1..30397733e 100644 --- a/cmd/integration/commands/refetence_db.go +++ b/cmd/integration/commands/refetence_db.go @@ -328,6 +328,8 @@ func toMdbx(ctx context.Context, from, to string) error { appendFunc := c.Append if b.Flags&dbutils.DupSort != 0 && !b.AutoDupSortKeysConversion { appendFunc = c.(ethdb.CursorDupSort).AppendDup + } else if b.Flags&dbutils.DupFixed != 0 && !b.AutoDupSortKeysConversion { + appendFunc = c.(ethdb.CursorDupFixed).AppendDup } srcC := srcTx.Cursor(name) @@ -358,9 +360,8 @@ func toMdbx(ctx context.Context, from, to string) error { appendFunc = c.Append if b.Flags&dbutils.DupSort != 0 && !b.AutoDupSortKeysConversion { appendFunc = c.(ethdb.CursorDupSort).AppendDup - } - if b.Flags&dbutils.DupFixed != 0 && !b.AutoDupSortKeysConversion { - appendFunc = c.(ethdb.CursorDupSort).AppendDup + } else if b.Flags&dbutils.DupFixed != 0 && !b.AutoDupSortKeysConversion { + appendFunc = c.(ethdb.CursorDupFixed).AppendDup } } } @@ -370,7 +371,7 @@ func toMdbx(ctx context.Context, from, to string) error { if err != nil { return err } - _, err = dstTx.Sequence(name, currentID+1) + _, err = dstTx.Sequence(name, currentID) if err != nil { return err }