From a1ca332fdf5fb9df62ecb3934d1bb9b10f10dc64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Thu, 5 Dec 2024 12:23:34 -0800 Subject: [PATCH] fix address generation --- fvm/accountV2Migration/contract.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fvm/accountV2Migration/contract.go b/fvm/accountV2Migration/contract.go index 2bf1352cdb0..0d62dceb7d5 100644 --- a/fvm/accountV2Migration/contract.go +++ b/fvm/accountV2Migration/contract.go @@ -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