Documentation
¶
Index ¶
- Variables
- func CheckAllValidatorList(t *testing.T, accountName string, isInAllValidatorList bool, ...)
- func CheckAppBandwidthInfo(t *testing.T, info bandwidthmodel.AppBandwidthInfo, username types.AccountKey, ...)
- func CheckBalance(t *testing.T, accountName string, lb *app.LinoBlockchain, ...)
- func CheckCurBlockInfo(t *testing.T, info bandwidthmodel.BlockInfo, lb *app.LinoBlockchain)
- func CheckGlobalAllocation(t *testing.T, lb *app.LinoBlockchain, ...)
- func CheckOncallValidatorList(t *testing.T, accountName string, isInOnCallValidatorList bool, ...)
- func CheckValidatorDeposit(t *testing.T, accountName string, lb *app.LinoBlockchain, ...)
- func CreateAccount(t *testing.T, accountName string, lb *app.LinoBlockchain, seq uint64, ...)
- func CreateTestPost(t *testing.T, lb *app.LinoBlockchain, username, postID string, seq uint64, ...)
- func GetGenesisAccountCoin(numOfValidator int) types.Coin
- func NewTestLinoBlockchain(t *testing.T, numOfValidators int) *app.LinoBlockchain
- func RepeatSignCheckDeliver(t *testing.T, lb *app.LinoBlockchain, msg sdk.Msg, seq uint64, expPass bool, ...)
- func SignCheckDeliver(t *testing.T, lb *app.LinoBlockchain, msg sdk.Msg, seq uint64, expPass bool, ...)
- func SignCheckDeliverWithFee(t *testing.T, lb *app.LinoBlockchain, msg sdk.Msg, seq uint64, expPass bool, ...)
- func SimulateOneBlock(lb *app.LinoBlockchain, headTime int64)
Constants ¶
This section is empty.
Variables ¶
var ( GenesisUser = "genesis" GenesisPriv = secp256k1.GenPrivKey() GenesisTransactionPriv = secp256k1.GenPrivKey() GenesisAppPriv = secp256k1.GenPrivKey() GenesisAddr = GenesisPriv.PubKey().Address() DefaultNumOfVal = 21 GenesisTotalCoin = types.NewCoinFromInt64(10000000000 * types.Decimals) CoinPerValidator = types.NewCoinFromInt64(100000000 * types.Decimals) PenaltyMissVote = types.NewCoinFromInt64(20000 * types.Decimals) ChangeParamMinDeposit = types.NewCoinFromInt64(100000 * types.Decimals) ProposalDecideSec int64 = 24 * 7 * 3600 ParamChangeExecutionSec int64 = 24 * 3600 CoinReturnIntervalSec int64 = 24 * 7 * 3600 CoinReturnTimes int64 = 7 ConsumptionFrictionRate = types.NewDecFromRat(5, 100) ConsumptionFreezingPeriodSec int64 = 24 * 7 * 3600 PostIntervalSec int64 = 600 )
construct some global keys and addrs.
Functions ¶
func CheckAllValidatorList ¶
func CheckAllValidatorList( t *testing.T, accountName string, isInAllValidatorList bool, lb *app.LinoBlockchain)
CheckAllValidatorList - check if account is in all validator set or not
func CheckAppBandwidthInfo ¶ added in v0.3.0
func CheckAppBandwidthInfo( t *testing.T, info bandwidthmodel.AppBandwidthInfo, username types.AccountKey, lb *app.LinoBlockchain)
CheckAppBandwidthInfo
func CheckBalance ¶
func CheckBalance(t *testing.T, accountName string, lb *app.LinoBlockchain, expectBalance types.Coin)
CheckBalance - check account balance
func CheckCurBlockInfo ¶ added in v0.3.0
func CheckCurBlockInfo( t *testing.T, info bandwidthmodel.BlockInfo, lb *app.LinoBlockchain)
CheckCurBlockInfo
func CheckGlobalAllocation ¶
func CheckGlobalAllocation(t *testing.T, lb *app.LinoBlockchain, expectAllocation param.GlobalAllocationParam)
CheckGlobalAllocation - check global allocation parameter
func CheckOncallValidatorList ¶
func CheckOncallValidatorList( t *testing.T, accountName string, isInOnCallValidatorList bool, lb *app.LinoBlockchain)
CheckOncallValidatorList - check if account is in oncall validator set or not
func CheckValidatorDeposit ¶
func CheckValidatorDeposit(t *testing.T, accountName string, lb *app.LinoBlockchain, expectDeposit types.Coin)
CheckValidatorDeposit - check validator deposit
func CreateAccount ¶
func CreateAccount( t *testing.T, accountName string, lb *app.LinoBlockchain, seq uint64, resetPriv, transactionPriv, appPriv secp256k1.PrivKeySecp256k1, numOfLino string)
CreateAccount - register account on test blockchain
func CreateTestPost ¶
func CreateTestPost( t *testing.T, lb *app.LinoBlockchain, username, postID string, seq uint64, priv secp256k1.PrivKeySecp256k1, publishTime int64)
CreateTestPost - create a test post
func GetGenesisAccountCoin ¶
GetGenesisAccountCoin - get genesis account coin
func NewTestLinoBlockchain ¶
func NewTestLinoBlockchain(t *testing.T, numOfValidators int) *app.LinoBlockchain
func RepeatSignCheckDeliver ¶ added in v0.3.0
func RepeatSignCheckDeliver(t *testing.T, lb *app.LinoBlockchain, msg sdk.Msg, seq uint64, expPass bool, priv secp256k1.PrivKeySecp256k1, headTime int64, times int)
RepeatSignCheckDeliver - sign same transaction repeatly, simulate and commit a block
func SignCheckDeliver ¶
func SignCheckDeliver(t *testing.T, lb *app.LinoBlockchain, msg sdk.Msg, seq uint64, expPass bool, priv secp256k1.PrivKeySecp256k1, headTime int64)
SignCheckDeliver - sign transaction, simulate and commit a block
func SignCheckDeliverWithFee ¶ added in v0.3.0
func SignCheckDeliverWithFee(t *testing.T, lb *app.LinoBlockchain, msg sdk.Msg, seq uint64, expPass bool, priv secp256k1.PrivKeySecp256k1, headTime int64, fee auth.StdFee)
SignCheckDeliverWithFee - sign transaction with fee, simulate and commit a block
func SimulateOneBlock ¶
func SimulateOneBlock(lb *app.LinoBlockchain, headTime int64)
SimulateOneBlock - simulate a empty block and commit
Types ¶
This section is empty.