Skip to content

Commit

Permalink
fix address generation
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent committed Dec 5, 2024
1 parent 2b1ecac commit a1ca332
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions fvm/accountV2Migration/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,15 @@ func declareScheduleAccountV2MigrationFunction(environment runtime.Environment,

addressGenerator := chainID.Chain().NewAddressGeneratorAtIndex(addressStartIndex)
for i := uint64(0); i < count; i++ {
address, err := addressGenerator.NextAddress()
if err != nil {
panic(err)
}

address := addressGenerator.CurrentAddress()
if !runtimeStorage.ScheduleV2Migration(common.Address(address)) {
return interpreter.FalseValue
}

_, err := addressGenerator.NextAddress()
if err != nil {
panic(err)
}
}

return interpreter.TrueValue
Expand Down

0 comments on commit a1ca332

Please sign in to comment.