dataformat

package
v0.0.0-...-b544036 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PreviousFormat specifies the data format in previous fabric version
	PreviousFormat = ""

	// CurrentFormat specifies the data format in current fabric version
	CurrentFormat = "2.0"
)

The data format stored in ledger databases may be changed in a new release to support new features. This file defines the constants to check whether or not the data format on the ledger matches the CurrentFormat. If not matched, peer start will fail and the ledger must be upgraded to the CurrentFormat. If a Fabric version does not introduce a new data format, CurrentFormat will remain the same as the latest format prior to the Fabric version.

Variables

This section is empty.

Functions

func IsVersionMismatch

func IsVersionMismatch(err error) bool

IsVersionMismatch returns true if err is an ErrFormatMismatch

Types

type ErrFormatMismatch

type ErrFormatMismatch struct {
	DBInfo         string
	ExpectedFormat string
	Format         string
}

ErrFormatMismatch is returned if it is detected that the version of the format recorded in the internal database is different from what is specified in the `Conf` that is used for opening the db

func (*ErrFormatMismatch) Error

func (e *ErrFormatMismatch) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL