ledger

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: ISC Imports: 4 Imported by: 1

README

Ledger

How to generate ledger
~ cd ./payledger
~ go generate
~ or `go run ledgerpayout.go privnet`

Documentation

Overview

It is called by go generate and used to automatically generate pre-computed Copyright 2017-2018 The qitmeer developers This file is auto generate

It is called by go generate and used to automatically generate pre-computed Copyright 2017-2018 The qitmeer developers This file is auto generate

It is called by go generate and used to automatically generate pre-computed Copyright 2017-2018 The qitmeer developers This file is auto generate

It is called by go generate and used to automatically generate pre-computed Copyright 2017-2018 The qitmeer developers This file is auto generate

Index

Constants

View Source
const PercentBase = 10000

Variables

View Source
var GenesisLedger []*TokenPayout

GenesisLedger specifies the list of payouts in the coinbase of genesis. Must be a constant fixed in the code. If there are no payouts to be given, set this to an empty slice.

Functions

func GenesisLedgerSubsidy

func GenesisLedgerSubsidy() types.Amount

BlockOneSubsidy returns the total subsidy of block height 1 for the network.

func Ledger

func Ledger(tx *types.Transaction, netType protocol.Network)

pay out tokens to a ledger.

Types

type LedgerParams added in v0.10.1

type LedgerParams struct {
	GenesisAmountUnit int64 // the unit amount of equally divided.
	MaxLockHeight     int64 // the max lock height
}

type PayoutList added in v0.10.1

type PayoutList []TokenPayoutReGen

func (PayoutList) Len added in v0.10.1

func (p PayoutList) Len() int

func (PayoutList) Less added in v0.10.1

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

func (PayoutList) Swap added in v0.10.1

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

type PayoutList2 added in v0.10.1

type PayoutList2 []TokenPayoutReGen

func (PayoutList2) Len added in v0.10.1

func (p PayoutList2) Len() int

func (PayoutList2) Less added in v0.10.1

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

func (PayoutList2) Swap added in v0.10.1

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

type TokenPayout

type TokenPayout struct {
	Address  string
	PkScript []byte
	Amount   types.Amount
}

TokenPayout is a payout for block 1 which specifies an address and an amount to pay to that address in a transaction output.

type TokenPayoutReGen added in v0.10.1

type TokenPayoutReGen struct {
	Payout    TokenPayout
	GenAmount types.Amount
}

Jump to

Keyboard shortcuts

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