Sync
The Sync method group contains methods for interacting with and observing the lotus sync service.
- syncCheckBad
- syncCheckpoint
- syncIncomingBlocks
- syncMarkBad
- syncState
- syncSubmitBlock
- syncUnmarkAllBad
- syncUnmarkBad
- syncValidateTipset
syncCheckBad
syncCheckBad (cid: Cid): Promise<string>
Checks if a block was marked as bad, and if it was, returns the reason.
Parameters:
cid
:Cid
Returns:
Promise<string>
Source: index.d.ts, line 737, character 14
syncCheckpoint
syncCheckpoint (tipSetKey: Cid[]): Promise<void>
Marks a blocks as checkpointed, meaning that it won't ever fork away from it.
Parameters:
tipSetKey
:Cid[]
Returns:
Promise<void>
Source: index.d.ts, line 741, character 16
syncIncomingBlocks
syncIncomingBlocks (handler: (data: BlockHeader) => void): [() => void, Promise<void>]
Returns a channel streaming incoming, potentially not yet synced block headers.
Parameters:
handler
:(data: BlockHeader) => void
Returns:
[() => void, Promise<void>]
Source: index.d.ts, line 746, character 20
syncMarkBad
syncMarkBad (cid: Cid): Promise<void>
Marks a blocks as bad, meaning that it won't ever by synced. Use with extreme caution.
Parameters:
cid
:Cid
Returns:
Promise<void>
Source: index.d.ts, line 751, character 13
syncState
syncState (): Promise<SyncState>
Returns the current status of the lotus sync system.
Returns:
Promise<SyncState>
Source: index.d.ts, line 755, character 11
syncSubmitBlock
syncSubmitBlock (blockMsg: BlockMsg): Promise<void>
Can be used to submit a newly created block to the. network through this node
Parameters:
blockMsg
:BlockMsg
Returns:
Promise<void>
Source: index.d.ts, line 760, character 17
syncUnmarkAllBad
syncUnmarkAllBad (): Promise<void>
Purges bad block cache, making it possible to sync to chains previously marked as bad
Returns:
Promise<void>
Source: index.d.ts, line 764, character 18
syncUnmarkBad
syncUnmarkBad (cid: Cid): Promise<void>
Unmarks a blocks as bad, making it possible to be validated and synced again.
Parameters:
cid
:Cid
Returns:
Promise<void>
Source: index.d.ts, line 768, character 15
syncValidateTipset
syncValidateTipset (tipSetKey: Cid[]): Promise<boolean>
Indicates whether the provided tipset is valid or not
Parameters:
tipSetKey
:Cid[]
Returns:
Promise<boolean>