Fix loop assignment issue

pull/3/head
Oliver Gugger 4 years ago
parent 0a517d1a75
commit aac8a2a728
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

@ -58,7 +58,7 @@ func fixOldChannelBackup(multiFile *chanbackup.MultiFile,
log.Infof("Checking shachain root of %d channels, this might take a "+
"while.", len(multi.StaticBackups))
fixedChannels := 0
for _, single := range multi.StaticBackups {
for idx, single := range multi.StaticBackups {
err := ring.CheckDescriptor(single.ShaChainRootDesc)
switch err {
case nil:
@ -77,7 +77,7 @@ func fixOldChannelBackup(multiFile *chanbackup.MultiFile,
if err != nil {
return err
}
single.ShaChainRootDesc = baseKeyDesc
multi.StaticBackups[idx].ShaChainRootDesc = baseKeyDesc
fixedChannels++
default:

Loading…
Cancel
Save