From 32d95fc97a01eb02d17665dfe329c89f6f4d6ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Sat, 10 Oct 2020 20:46:06 +0200 Subject: [PATCH] docsgen, gofmt --- api/apistruct/struct.go | 2 +- cli/sync.go | 6 +++--- documentation/en/api-methods.md | 11 +++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/api/apistruct/struct.go b/api/apistruct/struct.go index 6bfbf43cb..5ff83ed09 100644 --- a/api/apistruct/struct.go +++ b/api/apistruct/struct.go @@ -111,7 +111,7 @@ type FullNodeStruct struct { SyncCheckpoint func(ctx context.Context, key types.TipSetKey) error `perm:"admin"` SyncMarkBad func(ctx context.Context, bcid cid.Cid) error `perm:"admin"` SyncUnmarkBad func(ctx context.Context, bcid cid.Cid) error `perm:"admin"` - SyncUnmarkAllBad func(ctx context.Context) error `perm:"admin"` + SyncUnmarkAllBad func(ctx context.Context) error `perm:"admin"` SyncCheckBad func(ctx context.Context, bcid cid.Cid) (string, error) `perm:"read"` SyncValidateTipset func(ctx context.Context, tsk types.TipSetKey) (bool, error) `perm:"read"` diff --git a/cli/sync.go b/cli/sync.go index a5178441d..ea066cbda 100644 --- a/cli/sync.go +++ b/cli/sync.go @@ -122,11 +122,11 @@ var syncMarkBadCmd = &cli.Command{ } var syncUnmarkBadCmd = &cli.Command{ - Name: "unmark-bad", - Usage: "Unmark the given block as bad, makes it possible to sync to a chain containing it", + Name: "unmark-bad", + Usage: "Unmark the given block as bad, makes it possible to sync to a chain containing it", Flags: []cli.Flag{ &cli.BoolFlag{ - Name: "all", + Name: "all", Usage: "drop the entire bad block cache", }, }, diff --git a/documentation/en/api-methods.md b/documentation/en/api-methods.md index b3a9627e0..0774db1c8 100644 --- a/documentation/en/api-methods.md +++ b/documentation/en/api-methods.md @@ -175,6 +175,7 @@ * [SyncMarkBad](#SyncMarkBad) * [SyncState](#SyncState) * [SyncSubmitBlock](#SyncSubmitBlock) + * [SyncUnmarkAllBad](#SyncUnmarkAllBad) * [SyncUnmarkBad](#SyncUnmarkBad) * [SyncValidateTipset](#SyncValidateTipset) * [Wallet](#Wallet) @@ -4546,6 +4547,16 @@ Inputs: Response: `{}` +### SyncUnmarkAllBad +SyncUnmarkAllBad purges bad block cache, making it possible to sync to chains previously marked as bad + + +Perms: admin + +Inputs: `null` + +Response: `{}` + ### SyncUnmarkBad SyncUnmarkBad unmarks a blocks as bad, making it possible to be validated and synced again.