Skip to content

Commit 43dad9c

Browse files
committed
Cleanup
1 parent bddbf54 commit 43dad9c

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

cmd/migrate_valid.go

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func RunValidationMigration(cmd *cobra.Command, args []string) {
6767
default:
6868
}
6969

70-
endBlock := new(big.Int).Add(currentBlock, big.NewInt(int64(migrator.migrationBatchSize-1)))
70+
endBlock := new(big.Int).Add(currentBlock, big.NewInt(int64(migrator.batchSize-1)))
7171
if endBlock.Cmp(rangeEndBlock) > 0 {
7272
endBlock = rangeEndBlock
7373
}
@@ -170,13 +170,12 @@ func RunValidationMigration(cmd *cobra.Command, args []string) {
170170
}
171171

172172
type Migrator struct {
173-
rpcClient rpc.IRPCClient
174-
worker *worker.Worker
175-
source storage.IStorage
176-
destination storage.IMainStorage
177-
validator *orchestrator.Validator
178-
migrationBatchSize int
179-
rpcBatchSize int
173+
rpcClient rpc.IRPCClient
174+
worker *worker.Worker
175+
source storage.IStorage
176+
destination storage.IMainStorage
177+
validator *orchestrator.Validator
178+
batchSize int
180179
}
181180

182181
func NewMigrator() *Migrator {
@@ -212,12 +211,12 @@ func NewMigrator() *Migrator {
212211
}
213212

214213
return &Migrator{
215-
migrationBatchSize: batchSize,
216-
rpcClient: rpcClient,
217-
source: sourceConnector,
218-
destination: destinationConnector,
219-
validator: validator,
220-
worker: worker.NewWorker(rpcClient),
214+
batchSize: batchSize,
215+
rpcClient: rpcClient,
216+
source: sourceConnector,
217+
destination: destinationConnector,
218+
validator: validator,
219+
worker: worker.NewWorker(rpcClient),
221220
}
222221
}
223222

0 commit comments

Comments
 (0)