Documentation ¶
Index ¶
- func ClearPreResetHeight(couchInstance *couchdb.CouchInstance, ledgerIDs []string) error
- func LoadPreResetHeight(couchInstance *couchdb.CouchInstance, ledgerIDs []string) (map[string]uint64, error)
- func NewProvider(indexConfig *blkstorage.IndexConfig, ledgerconfig *ledger.Config) (api.BlockStoreProvider, error)
- func ResetBlockStore(couchInstance *couchdb.CouchInstance) error
- func Rollback(couchInstance *couchdb.CouchInstance, internalQueryLimit int, ledgerID string, ...) error
- func ValidateRollbackParams(couchInstance *couchdb.CouchInstance, ledgerID string, targetBlockNum uint64) error
- type CDBBlockstoreProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearPreResetHeight ¶ added in v0.1.4
func ClearPreResetHeight(couchInstance *couchdb.CouchInstance, ledgerIDs []string) error
ClearPreResetHeight deletes the files that contain the last recorded reset heights for the specified ledgers
func LoadPreResetHeight ¶ added in v0.1.4
func LoadPreResetHeight(couchInstance *couchdb.CouchInstance, ledgerIDs []string) (map[string]uint64, error)
LoadPreResetHeight searches the preResetHeight files for the specified ledgers and returns a map of channelname to the last recorded block height during one of the reset operations.
func NewProvider ¶
func NewProvider(indexConfig *blkstorage.IndexConfig, ledgerconfig *ledger.Config) (api.BlockStoreProvider, error)
NewProvider creates a new CouchDB BlockStoreProvider
func ResetBlockStore ¶ added in v0.1.4
func ResetBlockStore(couchInstance *couchdb.CouchInstance) error
ResetBlockStore drops the block storage index and truncates the blocks files for all channels/ledgers to genesis blocks
func Rollback ¶ added in v0.1.4
func Rollback(couchInstance *couchdb.CouchInstance, internalQueryLimit int, ledgerID string, targetBlockNum uint64) error
Rollback reverts changes made to the block store beyond a given block number.
func ValidateRollbackParams ¶ added in v0.1.4
func ValidateRollbackParams(couchInstance *couchdb.CouchInstance, ledgerID string, targetBlockNum uint64) error
ValidateRollbackParams performs necessary validation on the input given for the rollback operation.
Types ¶
type CDBBlockstoreProvider ¶
type CDBBlockstoreProvider struct {
// contains filtered or unexported fields
}
CDBBlockstoreProvider provides block storage in CouchDB
func (*CDBBlockstoreProvider) Close ¶
func (p *CDBBlockstoreProvider) Close()
Close cleans up the Provider
func (*CDBBlockstoreProvider) Open ¶ added in v0.1.4
func (p *CDBBlockstoreProvider) Open(ledgerid string) (api.BlockStore, error)
Open opens the block store for the given ledger ID