interest

package
v0.0.0-...-c3c44a6 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: MIT Imports: 15 Imported by: 0

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

View Source
const (
	PackageName = "利息奖励"
	Denominator = 1000000000
	POWER       = float64(1)
)
View Source
const INTERESTDIR = "./interestdir"

Variables

This section is empty.

Functions

func DeltaNew

func DeltaNew(st util.StateDB, preSt util.StateDB, depositCfgVersion string) *interestDelta

func New

func New(st util.StateDB, preSt util.StateDB) *interest

Types

type DepositInterestRate

type DepositInterestRate struct {
	Deposit  *big.Int
	Interest uint64
}

type DepositInterestRateList

type DepositInterestRateList []*DepositInterestRate

func (DepositInterestRateList) Len

func (p DepositInterestRateList) Len() int

func (DepositInterestRateList) Less

func (p DepositInterestRateList) Less(i, j int) bool

func (DepositInterestRateList) Swap

func (p DepositInterestRateList) Swap(i, j int)

type InterestOperator

type InterestOperator interface {
	PayInterest(state vm.StateDBManager, num uint64, time uint64) map[common.Address]*big.Int
	CalcReward(state vm.StateDBManager, num uint64, parentHash common.Hash)
}

func ManageNew

func ManageNew(st util.StateDB, preSt util.StateDB) InterestOperator

Jump to

Keyboard shortcuts

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