Documentation
¶
Index ¶
Constants ¶
View Source
const ( LedgerSubModName = "ledger" StateSubModName = "state" // ledger storage dir name LedgerStrgDirName = "ledger" // state machine storage dir name StateStrgDirName = "utxovm" )
View Source
const ( BlocksTablePrefix = "B" UTXOTablePrefix = "U" UnconfirmedTablePrefix = "N" ConfirmedTablePrefix = "C" MetaTablePrefix = "M" PendingBlocksTablePrefix = "PB" ExtUtxoDelTablePrefix = "ZD" ExtUtxoTablePrefix = "ZU" BlockHeightPrefix = "ZH" BranchInfoPrefix = "ZI" )
base definition for KV prefix
Variables ¶
View Source
var ( ErrKVNotFound = errors.New("Key not found") ErrP2PError = errors.New("invalid stream") )
Functions ¶
func NormalizeKVError ¶
Types ¶
type LedgerCtx ¶
type LedgerCtx struct { // 基础上下文 xctx.BaseCtx // 运行环境配置 EnvCfg *xconf.EnvConf // 账本配置 LedgerCfg *XLedgerConf // 链名 BCName string }
账本运行上下文环境
type UtxoConfig ¶
type XLedgerConf ¶
type XLedgerConf struct { // kv storage type KVEngineType string `yaml:"kvEngineType,omitempty"` OtherPaths []string `yaml:"otherPaths,omitempty"` StorageType string `yaml:"storageType,omitempty"` Utxo UtxoConfig `yaml:"utxo,omitempty"` BlockCacheSize int `yaml:"blockCacheSize,omitempty"` TxCacheSize int `yaml:"txCacheSize,omitempty"` MempoolTxLimit int `yaml:"mempoolTxLimit,omitempty"` }
func GetDefLedgerConf ¶
func GetDefLedgerConf() *XLedgerConf
func LoadLedgerConf ¶
func LoadLedgerConf(cfgFile string) (*XLedgerConf, error)
Click to show internal directories.
Click to hide internal directories.