Documentation ¶
Index ¶
- Variables
- func Hash(cache TicketCache) (common.Hash, error)
- type BlockNodes
- func (*BlockNodes) Descriptor() ([]byte, []int)
- func (m *BlockNodes) GetBNodes() map[string]*NodeTicketIds
- func (*BlockNodes) ProtoMessage()
- func (m *BlockNodes) Reset()
- func (m *BlockNodes) String() string
- func (m *BlockNodes) XXX_DiscardUnknown()
- func (m *BlockNodes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockNodes) XXX_Merge(src proto.Message)
- func (m *BlockNodes) XXX_Size() int
- func (m *BlockNodes) XXX_Unmarshal(b []byte) error
- type NodeTicketIds
- func (*NodeTicketIds) Descriptor() ([]byte, []int)
- func (m *NodeTicketIds) GetNTickets() map[string]*TicketIds
- func (*NodeTicketIds) ProtoMessage()
- func (m *NodeTicketIds) Reset()
- func (m *NodeTicketIds) String() string
- func (m *NodeTicketIds) XXX_DiscardUnknown()
- func (m *NodeTicketIds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NodeTicketIds) XXX_Merge(src proto.Message)
- func (m *NodeTicketIds) XXX_Size() int
- func (m *NodeTicketIds) XXX_Unmarshal(b []byte) error
- type NumBlocks
- func (*NumBlocks) Descriptor() ([]byte, []int)
- func (m *NumBlocks) GetBlockCount() uint32
- func (m *NumBlocks) GetNBlocks() map[string]*BlockNodes
- func (*NumBlocks) ProtoMessage()
- func (m *NumBlocks) Reset()
- func (m *NumBlocks) String() string
- func (m *NumBlocks) XXX_DiscardUnknown()
- func (m *NumBlocks) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NumBlocks) XXX_Merge(src proto.Message)
- func (m *NumBlocks) XXX_Size() int
- func (m *NumBlocks) XXX_Unmarshal(b []byte) error
- type SortCalcHash
- func (*SortCalcHash) Descriptor() ([]byte, []int)
- func (m *SortCalcHash) GetNodeids() []string
- func (m *SortCalcHash) GetTids() []*TicketIds
- func (*SortCalcHash) ProtoMessage()
- func (m *SortCalcHash) Reset()
- func (m *SortCalcHash) String() string
- func (m *SortCalcHash) XXX_DiscardUnknown()
- func (m *SortCalcHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SortCalcHash) XXX_Merge(src proto.Message)
- func (m *SortCalcHash) XXX_Size() int
- func (m *SortCalcHash) XXX_Unmarshal(b []byte) error
- type TicketCache
- func (tc TicketCache) AppendTicketCache(nodeid discover.NodeID, tids []common.Hash)
- func (tc TicketCache) GetSortStruct() *SortCalcHash
- func (tc TicketCache) GetTicketCache(nodeid discover.NodeID) ([]common.Hash, error)
- func (tc TicketCache) RemoveTicketCache(nodeid discover.NodeID, tids []common.Hash) error
- func (tc TicketCache) TCount(nodeid discover.NodeID) uint64
- func (tc TicketCache) TicketCaceheSnapshot() TicketCache
- type TicketIds
- func (*TicketIds) Descriptor() ([]byte, []int)
- func (m *TicketIds) GetTicketId() [][]byte
- func (*TicketIds) ProtoMessage()
- func (m *TicketIds) Reset()
- func (m *TicketIds) String() string
- func (m *TicketIds) XXX_DiscardUnknown()
- func (m *TicketIds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TicketIds) XXX_Merge(src proto.Message)
- func (m *TicketIds) XXX_Size() int
- func (m *TicketIds) XXX_Unmarshal(b []byte) error
- type TicketTempCache
- func (t *TicketTempCache) Commit(db ethdb.Database, currentBlockNumber *big.Int, currentBlockHash common.Hash) error
- func (t *TicketTempCache) GetNodeTicketsMap(blocknumber *big.Int, blockhash common.Hash) TicketCache
- func (t *TicketTempCache) Submit2Cache(blocknumber, blockInterval *big.Int, blockhash common.Hash, in TicketCache)
- type Timer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type BlockNodes ¶
type BlockNodes struct { BNodes map[string]*NodeTicketIds `` /* 153-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BlockNodes) Descriptor ¶
func (*BlockNodes) Descriptor() ([]byte, []int)
func (*BlockNodes) GetBNodes ¶
func (m *BlockNodes) GetBNodes() map[string]*NodeTicketIds
func (*BlockNodes) ProtoMessage ¶
func (*BlockNodes) ProtoMessage()
func (*BlockNodes) Reset ¶
func (m *BlockNodes) Reset()
func (*BlockNodes) String ¶
func (m *BlockNodes) String() string
func (*BlockNodes) XXX_DiscardUnknown ¶
func (m *BlockNodes) XXX_DiscardUnknown()
func (*BlockNodes) XXX_Marshal ¶
func (m *BlockNodes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockNodes) XXX_Merge ¶
func (m *BlockNodes) XXX_Merge(src proto.Message)
func (*BlockNodes) XXX_Size ¶
func (m *BlockNodes) XXX_Size() int
func (*BlockNodes) XXX_Unmarshal ¶
func (m *BlockNodes) XXX_Unmarshal(b []byte) error
type NodeTicketIds ¶
type NodeTicketIds struct { NTickets map[string]*TicketIds `` /* 157-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*NodeTicketIds) Descriptor ¶
func (*NodeTicketIds) Descriptor() ([]byte, []int)
func (*NodeTicketIds) GetNTickets ¶
func (m *NodeTicketIds) GetNTickets() map[string]*TicketIds
func (*NodeTicketIds) ProtoMessage ¶
func (*NodeTicketIds) ProtoMessage()
func (*NodeTicketIds) Reset ¶
func (m *NodeTicketIds) Reset()
func (*NodeTicketIds) String ¶
func (m *NodeTicketIds) String() string
func (*NodeTicketIds) XXX_DiscardUnknown ¶
func (m *NodeTicketIds) XXX_DiscardUnknown()
func (*NodeTicketIds) XXX_Marshal ¶
func (m *NodeTicketIds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NodeTicketIds) XXX_Merge ¶
func (m *NodeTicketIds) XXX_Merge(src proto.Message)
func (*NodeTicketIds) XXX_Size ¶
func (m *NodeTicketIds) XXX_Size() int
func (*NodeTicketIds) XXX_Unmarshal ¶
func (m *NodeTicketIds) XXX_Unmarshal(b []byte) error
type NumBlocks ¶
type NumBlocks struct { NBlocks map[string]*BlockNodes `` /* 155-byte string literal not displayed */ BlockCount uint32 `protobuf:"varint,2,opt,name=BlockCount,proto3" json:"BlockCount,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*NumBlocks) Descriptor ¶
func (*NumBlocks) GetBlockCount ¶
func (*NumBlocks) GetNBlocks ¶
func (m *NumBlocks) GetNBlocks() map[string]*BlockNodes
func (*NumBlocks) ProtoMessage ¶
func (*NumBlocks) ProtoMessage()
func (*NumBlocks) XXX_DiscardUnknown ¶
func (m *NumBlocks) XXX_DiscardUnknown()
func (*NumBlocks) XXX_Marshal ¶
func (*NumBlocks) XXX_Unmarshal ¶
type SortCalcHash ¶
type SortCalcHash struct { Nodeids []string `protobuf:"bytes,1,rep,name=Nodeids,proto3" json:"Nodeids,omitempty"` Tids []*TicketIds `protobuf:"bytes,2,rep,name=Tids,proto3" json:"Tids,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SortCalcHash) Descriptor ¶
func (*SortCalcHash) Descriptor() ([]byte, []int)
func (*SortCalcHash) GetNodeids ¶
func (m *SortCalcHash) GetNodeids() []string
func (*SortCalcHash) GetTids ¶
func (m *SortCalcHash) GetTids() []*TicketIds
func (*SortCalcHash) ProtoMessage ¶
func (*SortCalcHash) ProtoMessage()
func (*SortCalcHash) Reset ¶
func (m *SortCalcHash) Reset()
func (*SortCalcHash) String ¶
func (m *SortCalcHash) String() string
func (*SortCalcHash) XXX_DiscardUnknown ¶
func (m *SortCalcHash) XXX_DiscardUnknown()
func (*SortCalcHash) XXX_Marshal ¶
func (m *SortCalcHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SortCalcHash) XXX_Merge ¶
func (m *SortCalcHash) XXX_Merge(src proto.Message)
func (*SortCalcHash) XXX_Size ¶
func (m *SortCalcHash) XXX_Size() int
func (*SortCalcHash) XXX_Unmarshal ¶
func (m *SortCalcHash) XXX_Unmarshal(b []byte) error
type TicketCache ¶
func GetNodeTicketsCacheMap ¶
func GetNodeTicketsCacheMap(blocknumber *big.Int, blockhash common.Hash) (ret TicketCache)
Create a ticket cache by blocknumber and blockHash from global temp
func NewTicketCache ¶
func NewTicketCache() TicketCache
func (TicketCache) AppendTicketCache ¶
func (tc TicketCache) AppendTicketCache(nodeid discover.NodeID, tids []common.Hash)
func (TicketCache) GetSortStruct ¶
func (tc TicketCache) GetSortStruct() *SortCalcHash
func (TicketCache) GetTicketCache ¶
func (TicketCache) RemoveTicketCache ¶
func (TicketCache) TicketCaceheSnapshot ¶
func (tc TicketCache) TicketCaceheSnapshot() TicketCache
copy a cache as (nodeId => []ticketId)
type TicketIds ¶
type TicketIds struct { TicketId [][]byte `protobuf:"bytes,1,rep,name=TicketId,proto3" json:"TicketId,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TicketIds) Descriptor ¶
func (*TicketIds) GetTicketId ¶
func (*TicketIds) ProtoMessage ¶
func (*TicketIds) ProtoMessage()
func (*TicketIds) XXX_DiscardUnknown ¶
func (m *TicketIds) XXX_DiscardUnknown()
func (*TicketIds) XXX_Marshal ¶
func (*TicketIds) XXX_Unmarshal ¶
type TicketTempCache ¶
type TicketTempCache struct { Cache *NumBlocks // contains filtered or unexported fields }
func GetTicketidsCachePtr ¶
func GetTicketidsCachePtr() *TicketTempCache
func NewTicketIdsCache ¶
func NewTicketIdsCache(db ethdb.Database) *TicketTempCache
func NewTicketIdsCache(db ethdb.Database) *NumBlocks {
func (*TicketTempCache) GetNodeTicketsMap ¶
func (t *TicketTempCache) GetNodeTicketsMap(blocknumber *big.Int, blockhash common.Hash) TicketCache
func (*TicketTempCache) Submit2Cache ¶
func (t *TicketTempCache) Submit2Cache(blocknumber, blockInterval *big.Int, blockhash common.Hash, in TicketCache)
Click to show internal directories.
Click to hide internal directories.