mtxdpos

package
v0.0.0-...-2f68b9a Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or 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

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

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

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

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

func (*MtxDPOS) VerifyVersionSigns

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