Version: v0.0.0-...-dc87987 Latest Latest

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

Go to latest
Published: Apr 3, 2021 License: MIT Imports: 30 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Processor

type Processor struct {
	// contains filtered or unexported fields

Processor manages a storage node.

func NewStorageProcessor

func NewStorageProcessor(shard2 shard.Index, dataDir StorageDir, blockChain iblockchain.BlockChain, dPool idepositpool.DepositPool, heartBeatManager iheartbeat.HeartBeat) *Processor

func (*Processor) GetAllShardHeights

func (pcr *Processor) GetAllShardHeights() []shard.IndexAndHeight

GetAllShardHeights returns the current height of all shards.

func (*Processor) GetBlockInfo

func (pcr *Processor) GetBlockInfo(height int64) []*wire.MsgBlock

GetBlockInfo returns all blocks after the specified height.

func (*Processor) GetBlockSliceInfoBetween

func (pcr *Processor) GetBlockSliceInfoBetween(startHeight, endHeight int64) []*wire.MsgBlock

GetBlockSliceInfoBetween returns all blocks between the specified heights.

func (*Processor) GetBlockSliceInfoSince

func (pcr *Processor) GetBlockSliceInfoSince(startHeight int64) []*wire.MsgBlock

GetBlockSliceInfoSince returns all blocks after the specified height.

func (*Processor) GetOutState

func (pcr *Processor) GetOutState(outPoint *wire.OutPoint) (*wire.OutState, error)

GetOutState returns the corresponding outstate according to the specified outpoint.

func (*Processor) GetSlimBlockInfo

func (pcr *Processor) GetSlimBlockInfo(toShard shard.Index, height int64) []*wire.SlimBlock

GetSlimBlockInfo returns all SlimBlocks after the specified height in the specified shard.

func (*Processor) GetSlimBlockSliceInfoBetween

func (pcr *Processor) GetSlimBlockSliceInfoBetween(toShard shard.Index, startHeight, endHeight int64) []*wire.SlimBlock

GetSlimBlockSliceInfoBetween returns all slimblocks between the specified heights.

func (*Processor) GetSlimBlockSliceInfoSince

func (pcr *Processor) GetSlimBlockSliceInfoSince(toShard shard.Index, startHeight int64) []*wire.SlimBlock

GetSlimBlockSliceInfoSince returns all slimBlocks after the specified height.

func (*Processor) GetSmartContractInfo

func (pcr *Processor) GetSmartContractInfo(contractAddr multivacaddress.Address, shardIdx shard.Index) *wire.SmartContractInfo

GetSmartContractInfo returns smartContractInfo for specified shard and contract address.

func (*Processor) HandleMsg

func (pcr *Processor) HandleMsg(msg wire.Message, pr peer.Reply)

HandleMsg handles messages from peers.

func (*Processor) PendingTransactionNumber

func (pcr *Processor) PendingTransactionNumber() int

PendingTransactionNumber returns the number of transactions waiting to be packaged in the current trading pool.

func (*Processor) SetSyncManager

func (pcr *Processor) SetSyncManager(mgr isync.SyncManager)

SetSyncManager sets the storage node's sync manager.

func (*Processor) ShardHeight

func (pcr *Processor) ShardHeight() int64

ShardHeight returns the current shard height.

func (*Processor) Start

func (pcr *Processor) Start()

Start a storage node.

type StorageDir

type StorageDir string

StorageDir is defined as string type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL