rpc, node, mempool and start of ight client

This commit is contained in:
Marko Baricevic
2021-02-02 14:42:20 +01:00
parent b2f3e767a7
commit 7e7e962d93
26 changed files with 73 additions and 77 deletions
+5 -5
View File
@@ -14,7 +14,7 @@ type Store interface {
// ValidatorSet (h: height).
//
// height must be > 0.
DeleteLightBlock(height int64) error
DeleteLightBlock(height uint64) error
// LightBlock returns the LightBlock that corresponds to the given
// height.
@@ -22,22 +22,22 @@ type Store interface {
// height must be > 0.
//
// If LightBlock is not found, ErrLightBlockNotFound is returned.
LightBlock(height int64) (*types.LightBlock, error)
LightBlock(height uint64) (*types.LightBlock, error)
// LastLightBlockHeight returns the last (newest) LightBlock height.
//
// If the store is empty, -1 and nil error are returned.
LastLightBlockHeight() (int64, error)
LastLightBlockHeight() (uint64, error)
// FirstLightBlockHeight returns the first (oldest) LightBlock height.
//
// If the store is empty, -1 and nil error are returned.
FirstLightBlockHeight() (int64, error)
FirstLightBlockHeight() (uint64, error)
// LightBlockBefore returns the LightBlock before a certain height.
//
// height must be > 0 && <= LastLightBlockHeight.
LightBlockBefore(height int64) (*types.LightBlock, error)
LightBlockBefore(height uint64) (*types.LightBlock, error)
// Prune removes headers & the associated validator sets when Store reaches a
// defined size (number of header & validator set pairs).