transaction

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionX  = "transaction"
	DefaultType   = "_doc"
	RTransactionX = "transaction"
)

unfreeze db

View Source
const (
	TxRecordMapping = `` /* 2307-byte string literal not displayed */

)

mapping

Variables

This section is empty.

Functions

func GetTransactionRecord

func GetTransactionRecord(env *db.TxEnv, op int) db.Record

GetTransactionRecord get tx record

func InitDB

func InitDB(cli db.DBCreator) error

InitDB init db

func NewTransactionKey

func NewTransactionKey(id string) *db.IKey

NewTransactionKey NewTransactionKey

Types

type AddrRecord

type AddrRecord struct {
	VoterAddr []string `json:"voter_addr"`
	MakerAddr []string `json:"maker_addr"`
}

AddrRecord 投票账户和打包账户的记录

type Asset

type Asset struct {
	Exec   string `json:"exec"`
	Symbol string `json:"symbol"`
	Amount int64  `json:"amount"`
}

Asset asset

type Block

type Block struct {
	Height    int64  `json:"height"`
	BlockTime int64  `json:"block_time"`
	BlockHash string `json:"block_hash"`
}

Block info

type Transaction

type Transaction struct {
	// as key
	HeightIndex int64 `json:"height_index"`
	*Block
	Success    bool        `json:"success"`
	Index      int64       `json:"index"`
	Hash       string      `json:"hash"`
	From       string      `json:"from"`
	To         string      `json:"to"`
	Execer     string      `json:"execer"`
	Amount     int64       `json:"amount"`
	Fee        int64       `json:"fee"`
	ActionName string      `json:"action_name"`
	GroupCount int64       `json:"group_count"`
	IsWithdraw bool        `json:"is_withdraw"`
	Options    interface{} `json:"options"`
	Assets     []Asset     `json:"assets"`
	Next       string      `json:"next"`
	IsPara     bool        `json:"is_para"`
	*AddrRecord
}

Transaction 记录通用的项

func ConvertTransaction

func ConvertTransaction(env *db.TxEnv) *Transaction

ConvertTransaction ConvertTransaction

type TxRecord

type TxRecord struct {
	*db.IKey
	*db.Op
	Tx *Transaction
}

TxRecord 用于db 记录

func (*TxRecord) Value

func (r *TxRecord) Value() []byte

Value impl

Jump to

Keyboard shortcuts

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