smallcrosstx

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: GPL-3.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SmallTxDB_SIG_PRE = "small_cross_sig"

	SmallTxDB_TX_PRE = "small_cross_tx"

	SmallTxDB_SIGCOUNT_PRE = "small_cross_sigcount"

	SmallTxDB_BLOCKHEIGHT_PRE = "small_cross_blockNumber"

	ErrNotFound = "leveldb: not found"

	ErrAllReadyConfirm = errors.New("smallCroTxConfirmed")
)

Functions

func BytesToInt

func BytesToInt(b []byte) uint64

func GetArbiterSignCount

func GetArbiterSignCount(elaHash string) (int, error)

func GetMaxArbitersSign

func GetMaxArbitersSign(total int) int

func GetReiceivedBlockHeight added in v0.2.0

func GetReiceivedBlockHeight(elaHash string) (uint64, error)

func IntToBytes

func IntToBytes(n uint64) []byte

func OnReceivedSmallCroTxFromDirectNet

func OnReceivedSmallCroTxFromDirectNet(arbiters [][]byte, total int, signature,
	rawTx string, blockHeight uint64)

func OnSmallCrossTx

func OnSmallCrossTx(arbiters []string, total int, signature, rawTx string,
	blockNumber uint64) error

func OnSmallTxSuccess added in v0.2.0

func OnSmallTxSuccess(elaHash string)

func PutSmallTxData

func PutSmallTxData(rawTx string, elaHash string) error

func PutSmallTxSignature

func PutSmallTxSignature(signature string, elaHash string, count int,
	blockNumber uint64) error

func SmallCrossTxInit

func SmallCrossTxInit(datadir string, evtMux *event.TypeMux)

Spv database initialization

Types

type ETSmallCrossTx

type ETSmallCrossTx struct {
	RawTx     string
	Signature string
}

type SmallCrossTx

type SmallCrossTx struct {
	RawTxID     string
	RawTx       string
	Signatures  []string
	BlockHeight uint64
}

func GetSmallCrossTxBytes added in v0.2.0

func GetSmallCrossTxBytes(elaHash string) ([]byte, *SmallCrossTx, error)

func GetSmallCrossTxMsg

func GetSmallCrossTxMsg(elaHash string) *SmallCrossTx

func NewSmallCrossTx added in v0.2.0

func NewSmallCrossTx() *SmallCrossTx

func (*SmallCrossTx) Deserialize added in v0.2.0

func (ct *SmallCrossTx) Deserialize(r io.Reader) error

func (*SmallCrossTx) Serialize added in v0.2.0

func (ct *SmallCrossTx) Serialize(w io.Writer) error

func (*SmallCrossTx) VerifiedSignature added in v0.2.0

func (ct *SmallCrossTx) VerifiedSignature(sig string) bool

Jump to

Keyboard shortcuts

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