testchain

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: LGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Stable   dbStatus = iota
	Unstable          // unstable but still in store
	NotInStore
)

Variables

View Source
var (
	FounderPrivate, _ = crypto.HexToECDSA("432a86ab8765d82415a803e29864dcfc1ed93dac949abf6f95a583179f27e4bb") // secp256k1.V = 1
	FounderAddr       = crypto.PubkeyToAddress(FounderPrivate.PublicKey)                                      // Lemo836BQKCBZ8Z7B7N4G4N4SNGBT24ZZSJQD24D

)

Functions

func ClearData

func ClearData()

func CloseTestChain

func CloseTestChain(bc *chain.BlockChain, db protocol.ChainDB)

func GetStorePath

func GetStorePath() string

func InitGenesis

func InitGenesis(db protocol.ChainDB) *types.Block

func LoadDefaultBlock

func LoadDefaultBlock(index int) *types.Block

func MakeTransferTx

func MakeTransferTx(fromPrivate *ecdsa.PrivateKey, to common.Address, amount *big.Int) *types.Transaction

func MakeTx

func MakeTx(fromPrivate *ecdsa.PrivateKey, to common.Address, amount *big.Int, gasLimit uint64, gasPrice *big.Int, expiration uint64) *types.Transaction

func NewTestChain

func NewTestChain() (*chain.BlockChain, protocol.ChainDB)

NewTestChain creates chain for test

func SignTx

func SignTx(tx *types.Transaction, private *ecdsa.PrivateKey) *types.Transaction

Types

This section is empty.

Jump to

Keyboard shortcuts

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