mtxdpos

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2019 License: MIT Imports: 8 Imported by: 9 modules, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php

Index

Constants

View Source
const (
	DPOSDefStock = 1 // 默认股权值
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v1.1.2

type Config struct {
	TargetSignCountRatio       float64
	TargetStockRatio           float64
	MinStockCount              int
	FullSignThreshold          int
	SuperNodeFullSignThreshold int
}

type MtxDPOS

type MtxDPOS struct {
	// contains filtered or unexported fields
}

func NewMtxDPOS

func NewMtxDPOS(simpleMode bool) *MtxDPOS

func (*MtxDPOS) CheckSuperBlock added in v1.1.1

func (md *MtxDPOS) CheckSuperBlock(reader consensus.StateReader, header *types.Header) error

func (*MtxDPOS) VerifyBlock

func (md *MtxDPOS) VerifyBlock(reader consensus.StateReader, header *types.Header) error

func (*MtxDPOS) VerifyHash

func (md *MtxDPOS) VerifyHash(reader consensus.StateReader, signHash common.Hash, signs []common.Signature) ([]common.Signature, error)

func (*MtxDPOS) VerifyHashWithBlock added in v1.1.1

func (md *MtxDPOS) VerifyHashWithBlock(reader consensus.StateReader, signHash common.Hash, signs []common.Signature, blockHash common.Hash) ([]common.Signature, error)

func (*MtxDPOS) VerifyHashWithStocks

func (md *MtxDPOS) VerifyHashWithStocks(reader consensus.StateReader, signHash common.Hash, signs []common.Signature, stocks map[common.Address]uint16, blockHash common.Hash) ([]common.Signature, error)

func (*MtxDPOS) VerifyHashWithVerifiedSigns

func (md *MtxDPOS) VerifyHashWithVerifiedSigns(reader consensus.StateReader, signs []*common.VerifiedSign) ([]common.Signature, error)

func (*MtxDPOS) VerifyHashWithVerifiedSignsAndBlock added in v1.1.1

func (md *MtxDPOS) VerifyHashWithVerifiedSignsAndBlock(reader consensus.StateReader, signs []*common.VerifiedSign, blockHash common.Hash) ([]common.Signature, error)

func (*MtxDPOS) VerifyVersionSigns added in v1.1.1

func (md *MtxDPOS) VerifyVersionSigns(reader consensus.StateReader, header *types.Header) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL