Documentation
¶
Index ¶
- type Processor
- func (pcr *Processor) GetAllShardHeights() []shard.IndexAndHeight
- func (pcr *Processor) GetBlockInfo(height int64) []*wire.MsgBlock
- func (pcr *Processor) GetBlockSliceInfoBetween(startHeight, endHeight int64) []*wire.MsgBlock
- func (pcr *Processor) GetBlockSliceInfoSince(startHeight int64) []*wire.MsgBlock
- func (pcr *Processor) GetOutState(outPoint *wire.OutPoint) (*wire.OutState, error)
- func (pcr *Processor) GetSlimBlockInfo(toShard shard.Index, height int64) []*wire.SlimBlock
- func (pcr *Processor) GetSlimBlockSliceInfoBetween(toShard shard.Index, startHeight, endHeight int64) []*wire.SlimBlock
- func (pcr *Processor) GetSlimBlockSliceInfoSince(toShard shard.Index, startHeight int64) []*wire.SlimBlock
- func (pcr *Processor) GetSmartContractInfo(contractAddr multivacaddress.Address, shardIdx shard.Index) *wire.SmartContractInfo
- func (pcr *Processor) HandleMsg(msg wire.Message, pr peer.Reply)
- func (pcr *Processor) PendingTransactionNumber() int
- func (pcr *Processor) SetSyncManager(mgr isync.SyncManager)
- func (pcr *Processor) ShardHeight() int64
- func (pcr *Processor) Start()
- type StorageDir
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 ¶
GetBlockInfo returns all blocks after the specified height.
func (*Processor) GetBlockSliceInfoBetween ¶
GetBlockSliceInfoBetween returns all blocks between the specified heights.
func (*Processor) GetBlockSliceInfoSince ¶
GetBlockSliceInfoSince returns all blocks after the specified height.
func (*Processor) GetOutState ¶
GetOutState returns the corresponding outstate according to the specified outpoint.
func (*Processor) GetSlimBlockInfo ¶
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) PendingTransactionNumber ¶
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 ¶
ShardHeight returns the current shard height.