Documentation ¶
Overview ¶
Distributed under the GNU Lesser General Public License v3.0 software license, see the accompanying file LICENSE or <https://www.gnu.org/licenses/lgpl-3.0.html>
Distributed under the GNU Lesser General Public License v3.0 software license, see the accompanying file LICENSE or <https://www.gnu.org/licenses/lgpl-3.0.html>
Distributed under the GNU Lesser General Public License v3.0 software license, see the accompanying file LICENSE or <https://www.gnu.org/licenses/lgpl-3.0.html>
Distributed under the GNU Lesser General Public License v3.0 software license, see the accompanying file LICENSE or <https://www.gnu.org/licenses/lgpl-3.0.html>
Index ¶
- type BFTEngine
- func (engine *BFTEngine) Accepts(parentID thor.Bytes32) (bool, error)
- func (engine *BFTEngine) CommitBlock(header *block.Header, isPacking bool) error
- func (engine *BFTEngine) Finalized() thor.Bytes32
- func (engine *BFTEngine) Select(header *block.Header) (bool, error)
- func (engine *BFTEngine) ShouldVote(parentID thor.Bytes32) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BFTEngine ¶
type BFTEngine struct {
// contains filtered or unexported fields
}
BFTEngine tracks all votes of blocks, computes the finalized checkpoint. Not thread-safe!
func NewEngine ¶
func NewEngine(repo *chain.Repository, mainDB *muxdb.MuxDB, forkConfig thor.ForkConfig, master thor.Address) (*BFTEngine, error)
NewEngine creates a new bft engine.
func (*BFTEngine) Accepts ¶
Accepts checks if the given block is on the same branch of finalized checkpoint.
func (*BFTEngine) CommitBlock ¶
CommitBlock commits bft state to storage.