dao

package
v0.0.0-...-ffb6f1e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDAO

type IDAO interface {
	IsAvailable() bool
	IsDuplicateError(err error) bool
	IsMaxPacketError(err error) bool

	AddBlock(m []*types.Block) error
	AddTransaction(m []*types.Transaction) error
	UpdateNodeList(m []*types.Node) error
	AddNodeReward(m *types.NodeReward, txs []*types.NodeRewardTx, rh []*types.NodeRewardHistory, cd *types.EthereumRewardTx) (string, error)
	UpdateNodeRewardTxStatus(digest []byte, s lib.TransactionStatus) error
	UpdateEthereumRewardTxStatus(id uint64, s lib.TransactionStatus, hash, message string) error
	UpdateDailyCoinsPrice(mntpUSD, goldUSD, mntpBTC, goldBTC float64, utc time.Time) error
	UpdateDailyTotalStake(a *amount.Amount, utc time.Time) error

	GetBlockIDRange(from, to *big.Int) ([]*big.Int, error)
	GetBlockRangeStats(from, to *big.Int) (*types.BlockRangeStatsView, error)
	GetBlockByID(id *big.Int) (*types.BlockView, error)
	GetBlocksPreview(from *big.Int, limit uint16) ([]*types.BlockView, error)
	GetTransactionPreviewByDigest(digest []byte) (*types.TransactionView, error)
	GetTransactionsPreview(block *big.Int, addr, fromDigest []byte, txName *sumuslib.Transaction) ([]*types.TransactionView, error)
	GetDailyStatsView(timestamp time.Time) ([]*types.DailyStatsView, error)

	GetNodeList(fromAddress []byte, active, all bool, healthGte float64) ([]*types.NodeView, error)
	GetNodeRewardTxLatestNonce() (uint64, error)
	GetIncompleteNodeRewardTx() ([]*types.NodeRewardTxView, error)
	GetIncompleteEthereumRewardTx() ([]*types.EthereumRewardTxView, error)
	GetLatestNodeReward() (*types.NodeRewardView, error)

	GetActiveNodeStats() (*types.NodeStatsView, error)
	GetRewardList(from *uint64) ([]*types.NodeRewardView, error)
	GetRewardTransactionsList(id uint64, fromNonce *uint64) ([]*types.NodeRewardTxView, error)
}

IDAO abstraction

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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