channeldb: add NoAmountData field to MigrateRevLogConfigImpl

Add a NoAmountData field to the MigrateRevLogConfigImpl struct and set
it for tests. This field is still a no-op in the migration.
This commit is contained in:
Elle Mouton committed 2023-02-16 20:46:05 +02:00
1 parent 70e3f8f511
commit 9c01916bc0
3 files changed
+48 -11

No files matched your search

+7 -2
View File
@@ -75,6 +75,7 @@ func TestMigrateRevocationLog(t *testing.T) {
}
fmt.Printf("Running %d test cases...\n", len(testCases))
fmt.Printf("withAmtData is set to: %v\n", withAmtData)
for i, tc := range testCases {
tc := tc
@@ -103,7 +104,9 @@ func TestMigrateRevocationLog(t *testing.T) {
return nil
}
cfg := &MigrateRevLogConfigImpl{}
cfg := &MigrateRevLogConfigImpl{
NoAmountData: !withAmtData,
}
migtest.ApplyMigrationWithDB(
t,
@@ -563,7 +566,9 @@ func BenchmarkMigration(b *testing.B) {
return setupTestLogs(db, c, oldLogs, nil)
}
cfg := &MigrateRevLogConfigImpl{}
cfg := &MigrateRevLogConfigImpl{
NoAmountData: !withAmtData,
}
// Run the migration test.
migtest.ApplyMigrationWithDB(