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

Loading…
Cancel
Save