Documentation ¶
Index ¶
- Variables
- func CloseLuaState(l *lua.LState)
- func CoinSetupTestBase(statedb *state.StateDB) (common.Hash, time.Duration)
- func CopyBytes(byts []byte) []byte
- func DetermineExternalAddress(listener net.Listener, lAddrIP, lAddrPort string, skipUPNP bool) (string, error)
- func ExecLuaWithParam(l *lua.LState, code string, entParams cvtypes.ParamUData) (cvtypes.ParamUData, error)
- func ExpandPath(p string) string
- func HashKeccak(data []byte) ([]byte, error)
- func HomeDir() string
- func LuaSyntaxCheck(code string) error
- func NewLuaState() *lua.LState
- func PbMarshal(msg proto.Message) []byte
- func PbUnmarshal(data []byte, msg proto.Message) error
- func PreparePrivateKeys(round int, num int64) []*ecdsa.PrivateKey
- func ProtocolAndAddress(listenAddr string) (string, string)
- func TxFromBytes(bytes []byte, tx cvtypes.ICivilTx) error
- func TxHash(tx cvtypes.ICivilTx) ([]byte, error)
- func TxSign(tx cvtypes.ICivilTx, p crypto.PrivKey) ([]byte, error)
- func TxToBytes(tx cvtypes.ICivilTx) ([]byte, error)
- func TxVerifySignature(tx cvtypes.ICivilTx) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( InitPrivateKeyHex = "0000000000000000000000000000000000000000000000000000000000000000" NumAccounts int64 = 100000 AccountsPerRound int64 = 10000 EthSigner = ethtypes.HomesteadSigner{} )
View Source
var (
ErrRetTypeWrong = errors.New("type of returned value is neither LTable nor LTString")
)
Functions ¶
func CloseLuaState ¶
func CoinSetupTestBase ¶
CoinSetupTestBase just create 1 million accounts with 10000 balance without tx, it should be much faster
func ExecLuaWithParam ¶
func ExecLuaWithParam(l *lua.LState, code string, entParams cvtypes.ParamUData) (cvtypes.ParamUData, error)
ExecLuaWithParam will not close lua.LState, so you should close it manually afterwards.
func ExpandPath ¶
func HashKeccak ¶
func LuaSyntaxCheck ¶
func NewLuaState ¶
func PreparePrivateKeys ¶
func PreparePrivateKeys(round int, num int64) []*ecdsa.PrivateKey
func ProtocolAndAddress ¶
func TxFromBytes ¶
TxFromBytes is just the reverse operation of TxToBytes
func TxSign ¶
TxSign now will also embed the pubkey of the signer, don't need filling pubkey manually
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.