Documentation
¶
Index ¶
Constants ¶
View Source
const ( BLOCK_TYPE = "block" CONNECTION_TYPE = "connects" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OverlineBlockchain ¶
type OverlineBlockchain struct {
Config OverlineBlockchainConfig
Mu sync.Mutex
CheckupMu sync.Mutex
Heads map[string]bool
HeadsToCheck map[string]uint64
BlockGraph *dagger.Graph
DB *database.OverlineDB
IbdTransitionPeriodRelativeDepth float64
// contains filtered or unexported fields
}
func (*OverlineBlockchain) AddBlock ¶
func (obc *OverlineBlockchain) AddBlock(block *p2p_pb.BcBlock)
func (*OverlineBlockchain) AddBlockRange ¶
func (obc *OverlineBlockchain) AddBlockRange(blocks *p2p_pb.BcBlocks)
func (*OverlineBlockchain) IsFollowingChain ¶
func (obc *OverlineBlockchain) IsFollowingChain() bool
func (*OverlineBlockchain) SetFollowingChain ¶
func (obc *OverlineBlockchain) SetFollowingChain()
func (*OverlineBlockchain) UnsetFollowingChain ¶
func (obc *OverlineBlockchain) UnsetFollowingChain()
type OverlineBlockchainConfig ¶
type OverlineBlockchainConfig struct {
DisjointCheckupDepth int `json:"disjoint_checkup_depth"` // if there is a chain segment not connected to db, how long does it have to be to ask to go look for blocks to try to connect?
DisplayDepth int `json:"display_depth"` // only show chains of this length or longer
}
func DefaultOverlineBlockchainConfig ¶
func DefaultOverlineBlockchainConfig() OverlineBlockchainConfig
Click to show internal directories.
Click to hide internal directories.