feat: allow checkpointing to forks

Previously, `lotus sync checkpoint` would only checkpoint on the current
chain. Now, it can switch to a new fork.
This commit is contained in:
Steven Allen
2021-04-28 13:54:26 -07:00
parent 4688da5178
commit 69da6a2a29
2 changed files with 21 additions and 8 deletions
+1 -1
View File
@@ -104,7 +104,7 @@ func (a *SyncAPI) SyncIncomingBlocks(ctx context.Context) (<-chan *types.BlockHe
func (a *SyncAPI) SyncCheckpoint(ctx context.Context, tsk types.TipSetKey) error {
log.Warnf("Marking tipset %s as checkpoint", tsk)
return a.Syncer.SetCheckpoint(tsk)
return a.Syncer.SyncCheckpoint(ctx, tsk)
}
func (a *SyncAPI) SyncMarkBad(ctx context.Context, bcid cid.Cid) error {