dip

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: LGPL-3.0 Imports: 11 Imported by: 1

README

Developer Incentive Protocol (DIP)

Src of DIP.

Documentation

Index

Constants

View Source
const (
	CacheSize = 128

	// DipRewardAddressPrivate dip reward rewardAddress:n1c6y4ctkMeZk624QWBTXuywmNpCWmJZiBq
	DipRewardAddressPrivate = "42f0c8b5feb72301619046ca87e6cf2c605e94dae0e24c9cb3a0101dbb60337c"
	// DipRewardAddressPassphrase
	DipRewardAddressPassphrase = "passphrase"
)

const types

Variables

View Source
var (
	ErrDipNotFound = errors.New("dip not found")

	ErrInvalidDipAddress                    = errors.New("invalid dip reward address")
	ErrUnsupportedTransactionFromDipAddress = errors.New("unsupported transaction from dip address")
)

Error types

Functions

This section is empty.

Types

type DIPData

type DIPData struct {
	StartHeight uint64     `json:"start_height,string"`
	EndHeight   uint64     `json:"end_height,string"`
	Version     uint64     `json:"version,string"`
	Dips        []*DIPItem `json:"dips"`
	Err         string     `json:"err"`
}

func (*DIPData) FromBytes

func (d *DIPData) FromBytes(data []byte) error

FromBytes

func (*DIPData) ToBytes

func (d *DIPData) ToBytes() ([]byte, error)

ToBytes serialize data

type DIPItem

type DIPItem struct {
	Address  string `json:"address"`
	Contract string `json:"contract"`
	Reward   string `json:"reward"`
}

type Dip

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

func NewDIP

func NewDIP(neb Neblet) (*Dip, error)

NewDIP create a dip

func (*Dip) CheckReward

func (d *Dip) CheckReward(tx *core.Transaction) error

func (*Dip) DipDelayRewardHeight

func (d *Dip) DipDelayRewardHeight() uint64

func (*Dip) GetDipList

func (d *Dip) GetDipList(height, version uint64) (core.Data, error)

GetDipList returns dip info list

func (*Dip) RewardAddress

func (d *Dip) RewardAddress() *core.Address

RewardAddress return dip reward rewardAddress.

func (*Dip) RewardValue

func (d *Dip) RewardValue() *util.Uint128

func (*Dip) Start

func (d *Dip) Start()

Start start dip.

func (*Dip) Stop

func (d *Dip) Stop()

Stop stop dip.

type DipReward

type DipReward struct {
	DipRewards []string `json:"dip_rewards"`
}

type Neblet

type Neblet interface {
	Config() *nebletpb.Config
	AccountManager() core.AccountManager
	BlockChain() *core.BlockChain
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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