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
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
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
- type BlockSlash
- type SlashDelta
- func (bp *SlashDelta) CalcSlash(currentState *state.StateDBManage, num uint64, ...)
- func (bp *SlashDelta) GetDeposit(parentHash common.Hash) []common.DepositBase
- func (bp *SlashDelta) GetElectAndInterest(currentState *state.StateDBManage, num uint64, parentHash common.Hash, ...) (map[common.Address][]common.OperationalInterestSlash, *mc.ElectGraph, error)
- func (bp *SlashDelta) SetSlash(electGraph *mc.ElectGraph, upTimeMap map[common.Address]uint64, ...)
- type SlashOperator
Constants ¶
View Source
const PackageName = "惩罚"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockSlash ¶
type BlockSlash struct { SlashRate uint64 // contains filtered or unexported fields }
func New ¶
func New(chain util.ChainReader, st util.StateDB, preSt util.StateDB) *BlockSlash
func (*BlockSlash) CalcSlash ¶
func (bp *BlockSlash) CalcSlash(currentState *state.StateDBManage, num uint64, upTimeMap map[common.Address]uint64, parentHash common.Hash, time uint64)
func (*BlockSlash) GetCurrentInterest ¶
func (bp *BlockSlash) GetCurrentInterest(preState *state.StateDBManage, currentState vm.StateDBManager, num uint64) map[common.Address]*big.Int
type SlashDelta ¶
type SlashDelta struct { SlashRate uint64 // contains filtered or unexported fields }
func DeltaNew ¶
func DeltaNew(chain util.ChainReader, st util.StateDB, preSt *state.StateDBManage) *SlashDelta
func (*SlashDelta) CalcSlash ¶
func (bp *SlashDelta) CalcSlash(currentState *state.StateDBManage, num uint64, upTimeMap map[common.Address]uint64, parentHash common.Hash, time uint64)
func (*SlashDelta) GetDeposit ¶
func (bp *SlashDelta) GetDeposit(parentHash common.Hash) []common.DepositBase
func (*SlashDelta) GetElectAndInterest ¶
func (bp *SlashDelta) GetElectAndInterest(currentState *state.StateDBManage, num uint64, parentHash common.Hash, upTimeMap map[common.Address]uint64, time uint64) (map[common.Address][]common.OperationalInterestSlash, *mc.ElectGraph, error)
func (*SlashDelta) SetSlash ¶
func (bp *SlashDelta) SetSlash(electGraph *mc.ElectGraph, upTimeMap map[common.Address]uint64, allAccountInterest map[common.Address][]common.OperationalInterestSlash, currentState *state.StateDBManage)
type SlashOperator ¶
type SlashOperator interface {
CalcSlash(currentState *state.StateDBManage, num uint64, upTimeMap map[common.Address]uint64, parentHash common.Hash, time uint64)
}
func ManageNew ¶
func ManageNew(chain util.ChainReader, st util.StateDB, preSt *state.StateDBManage) SlashOperator
Click to show internal directories.
Click to hide internal directories.