Documentation ¶
Index ¶
- type BCPool
- type BlockPool
- type ByHeight
- type ByTailHeight
- type Chain
- type ChainReader
- type ForkChainError
- type ForkVersion
- type MockSyncer
- func (*MockSyncer) BroadcastAccountBlock(addr types.Address, block *ledger.AccountBlock)
- func (*MockSyncer) BroadcastAccountBlocks(addr types.Address, blocks []*ledger.AccountBlock)
- func (*MockSyncer) BroadcastSnapshotBlock(block *ledger.SnapshotBlock)
- func (*MockSyncer) FetchAccountBlocks(start types.Hash, count uint64, address *types.Address)
- func (*MockSyncer) FetchSnapshotBlocks(start types.Hash, count uint64)
- func (*MockSyncer) SubscribeAccountBlock(fn net.AccountblockCallback) (subId int)
- func (*MockSyncer) SubscribeSnapshotBlock(fn net.SnapshotBlockCallback) (subId int)
- func (*MockSyncer) SubscribeSyncStatus(fn net.SyncStateCallback) (subId int)
- func (*MockSyncer) UnsubscribeAccountBlock(subId int)
- func (*MockSyncer) UnsubscribeSnapshotBlock(subId int)
- func (*MockSyncer) UnsubscribeSyncStatus(subId int)
- type PoolReader
- type PoolWriter
- type SnapshotProducerWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BCPool ¶
type BCPool struct { Id string LIMIT_HEIGHT uint64 LIMIT_LONGEST_NUM uint64 // contains filtered or unexported fields }
func (*BCPool) CurrentChain ¶
func (*BCPool) CurrentModifyToChain ¶
func (*BCPool) CurrentModifyToEmpty ¶
func (*BCPool) LongestChain ¶
type BlockPool ¶
type BlockPool interface { PoolWriter PoolReader SnapshotProducerWriter Start() Stop() Init(s syncer, wt *wallet.Manager, snapshotV *verifier.SnapshotVerifier, accountV *verifier.AccountVerifier) Info(addr *types.Address) string }
type ByTailHeight ¶
type ByTailHeight []*snippetChain
func (ByTailHeight) Len ¶
func (a ByTailHeight) Len() int
func (ByTailHeight) Less ¶
func (a ByTailHeight) Less(i, j int) bool
func (ByTailHeight) Swap ¶
func (a ByTailHeight) Swap(i, j int)
type ChainReader ¶
type ChainReader interface { Head() commonBlock GetBlock(height uint64) commonBlock }
type ForkChainError ¶
type ForkChainError struct {
What string
}
func (ForkChainError) Error ¶
func (e ForkChainError) Error() string
type ForkVersion ¶
type ForkVersion struct {
// contains filtered or unexported fields
}
func (*ForkVersion) Inc ¶
func (self *ForkVersion) Inc()
func (*ForkVersion) String ¶
func (self *ForkVersion) String() string
func (*ForkVersion) Val ¶
func (self *ForkVersion) Val() int
type MockSyncer ¶
type MockSyncer struct { }
func (*MockSyncer) BroadcastAccountBlock ¶
func (*MockSyncer) BroadcastAccountBlock(addr types.Address, block *ledger.AccountBlock)
func (*MockSyncer) BroadcastAccountBlocks ¶
func (*MockSyncer) BroadcastAccountBlocks(addr types.Address, blocks []*ledger.AccountBlock)
func (*MockSyncer) BroadcastSnapshotBlock ¶
func (*MockSyncer) BroadcastSnapshotBlock(block *ledger.SnapshotBlock)
func (*MockSyncer) FetchAccountBlocks ¶
func (*MockSyncer) FetchSnapshotBlocks ¶
func (*MockSyncer) FetchSnapshotBlocks(start types.Hash, count uint64)
func (*MockSyncer) SubscribeAccountBlock ¶
func (*MockSyncer) SubscribeAccountBlock(fn net.AccountblockCallback) (subId int)
func (*MockSyncer) SubscribeSnapshotBlock ¶
func (*MockSyncer) SubscribeSnapshotBlock(fn net.SnapshotBlockCallback) (subId int)
func (*MockSyncer) SubscribeSyncStatus ¶
func (*MockSyncer) SubscribeSyncStatus(fn net.SyncStateCallback) (subId int)
func (*MockSyncer) UnsubscribeAccountBlock ¶
func (*MockSyncer) UnsubscribeAccountBlock(subId int)
func (*MockSyncer) UnsubscribeSnapshotBlock ¶
func (*MockSyncer) UnsubscribeSnapshotBlock(subId int)
func (*MockSyncer) UnsubscribeSyncStatus ¶
func (*MockSyncer) UnsubscribeSyncStatus(subId int)
type PoolReader ¶
type PoolWriter ¶
type PoolWriter interface { // for normal account AddDirectAccountBlock(address types.Address, vmAccountBlock *vm_context.VmAccountBlock) error // for contract account AddDirectAccountBlocks(address types.Address, received *vm_context.VmAccountBlock, sendBlocks []*vm_context.VmAccountBlock) error }
Click to show internal directories.
Click to hide internal directories.