Documentation ¶
Index ¶
Constants ¶
View Source
const (
MaxStoredAvgTimeDiffs = 20
)
Variables ¶
View Source
var (
ForkDetected = errors.New("fork is detected")
)
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func NewEngine ¶
func NewEngine(chain *blockchain.Blockchain, gossipHandler *protocol.IdenaGossipHandler, proposals *pengings.Proposals, config *config.ConsensusConf, appState *appstate.AppState, votes *pengings.Votes, txpool *mempool.TxPool, secStore *secstore.SecStore, downloader *protocol.Downloader, offlineDetector *blockchain.OfflineDetector, statsCollector collector.StatsCollector) *Engine
func (*Engine) GetProcess ¶
func (*Engine) ReadonlyAppState ¶
type ForkDetector ¶
type ForkDetector interface { HasPotentialFork() bool GetForkedPeers() mapset.Set ClearPotentialForks() }
type ForkResolver ¶
type ForkResolver struct {
// contains filtered or unexported fields
}
func NewForkResolver ¶
func NewForkResolver(forkDetectors []ForkDetector, downloader *protocol.Downloader, chain *blockchain.Blockchain, statsCollector collector.StatsCollector) *ForkResolver
func (*ForkResolver) ApplyFork ¶
func (resolver *ForkResolver) ApplyFork() error
func (*ForkResolver) HasLoadedFork ¶
func (resolver *ForkResolver) HasLoadedFork() bool
func (*ForkResolver) Start ¶
func (resolver *ForkResolver) Start()
Click to show internal directories.
Click to hide internal directories.