Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit c3b4af3

Browse files
author
GitHub
committed
Automatic update on Mon Aug 9 07:23:40 UTC 2021
1 parent d192549 commit c3b4af3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/cothority/byzcoin/bcadmin/cmd_db.go

+7
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ func dbCatchup(c *cli.Context) error {
7979
if err != nil {
8080
return xerrors.Errorf("couldn't get blocks from network: %+v", err)
8181
}
82+
if sb == nil {
83+
break
84+
}
8285
if len(sb.ForwardLink) == 0 {
8386
if askAllNodes {
8487
// If no further blocks exist,
@@ -103,6 +106,7 @@ func dbCatchup(c *cli.Context) error {
103106
latestID = sb.ForwardLink[0].To
104107
}
105108

109+
log.Info("Downloaded all available blocks from the chain")
106110
return nil
107111
}
108112

@@ -878,6 +882,9 @@ func (fb *fetchBlocks) gbMulti(startID skipchain.SkipBlockID) (
878882
}
879883

880884
if !ok {
885+
if fb.index == len(fb.roster.List)-1 {
886+
return nil, nil
887+
}
881888
fb.nextNode()
882889
continue
883890
}

0 commit comments

Comments
 (0)