Documentation
¶
Index ¶
Constants ¶
const ( HomeFlag = "home" RPCListenAddress = "tcp://0.0.0.0:46657" P2PListenAddress = "tcp://0.0.0.0:46656" BaseConfigProxyApp = "tcp://127.0.0.1:46658" ConfigDir = "config" RootFile = "config.toml" )
const (
MINIMUN_STAKED int64 = int64(2000)
)
Variables ¶
var BeginUnbondingCmd = &cobra.Command{
Use: "begin_unbonding",
Short: "begin unbonding",
RunE: beginUnbonding,
}
var CompleteUnbondingCmd = &cobra.Command{
Use: "complete_unbonding",
Short: "complete unbonding",
RunE: completeUnbonding,
}
var InitFilesCmd = &cobra.Command{
Use: "init",
Short: "Initialize essential files",
RunE: initFiles,
}
InitFilesCmd initialises a fresh Tendermint Core instance.
var LoadCoinCmd = &cobra.Command{
Use: "load_coin",
Short: "send coin to other account",
RunE: loadCoin,
}
LoadCoinCmd - load coin to an account
var NodeCmd = constructCommand()
var RegisterValidatorCmd = &cobra.Command{
Use: "register_masternode",
Short: "register this node as a masternode",
RunE: registerValidator,
}
ShowNodeIDCmd dumps node's ID to the standard output.
var ResetAllCmd = &cobra.Command{
Use: "unsafe_reset_all",
Short: "(unsafe) Remove all the data and WAL, reset this node's validator to genesis state",
Run: resetAll,
}
ResetAllCmd removes the database of this Tendermint core instance.
var ResetPrivValidatorCmd = &cobra.Command{
Use: "unsafe_reset_priv_validator",
Short: "(unsafe) Reset this node's validator to genesis state",
Run: resetPrivValidator,
}
ResetPrivValidatorCmd resets the private validator files.
var RootCmd = &cobra.Command{ Use: "shareledger", Short: "Shareledger is a distributed blockchain for sharing services", PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) { bindFlagsLoadViper(cmd, args) config, err = ParseConfig() if err != nil { return err } return nil }, }
var SendCoinCmd = &cobra.Command{
Use: "send_coin",
Short: "send coin to other account",
RunE: sendCoin,
}
SendCoinCmd - send coin to other account
var ShowAddressCmd = &cobra.Command{
Use: "show_address",
Short: "Show this node's address",
RunE: showAddress,
}
ShowPrivKeyCmd dumps node's Private Key to the standard output.
var ShowBalanceCmd = &cobra.Command{
Use: "show_balance",
Short: "show current balance of this masternode",
RunE: showBalance,
}
var ShowNodeIDCmd = &cobra.Command{
Use: "show_node_id",
Short: "Show this node's ID",
RunE: showNodeID,
}
ShowNodeIDCmd dumps node's ID to the standard output.
var ShowPrivKeyCmd = &cobra.Command{
Use: "show_priv_key",
Short: "Show this node's private key",
RunE: showPrivKey,
}
ShowPrivKeyCmd dumps node's Private Key to the standard output.
var ShowVdiCmd = &cobra.Command{
Use: "show_val_dist_info",
Short: "show current earning of this masternode",
RunE: showVdiCmd,
}
var TestnetFilesCmd = &cobra.Command{
Use: "testnet",
Short: "Initialize files for a Tendermint testnet",
Long: `testnet will create "v" + "n" number of directories and populate each with
necessary files (private validator, genesis, config, etc.).
Note, strict routability for addresses is turned off in the config file.
Optionally, it will fill in persistent_peers list in config file using either hostnames or IPs.
Example:
shareledger testnet --v 4 --o ./output --populate-persistent-peers --starting-ip-address 192.168.10.2
`,
RunE: testnetFiles,
}
TestnetFilesCmd allows initialisation of files for a Tendermint testnet.
var VersionCmd = &cobra.Command{ Use: "version", Short: "Show version info", Run: func(cmd *cobra.Command, args []string) { fmt.Println("shareledger-"+version.Version, "tendermint-"+tmversion.Version) }, }
VersionCmd ...
var WithdrawBlockRewardCmd = &cobra.Command{
Use: "withdraw_block_reward",
Short: "withdraw block reward to accounts",
RunE: withdrawBlockReward,
}
Functions ¶
func ParseConfig ¶
func ParseLogLevel ¶
ParseLogLevel parses complex log level - comma-separated list of module:level pairs with an optional *:level pair (* means all other modules).
Example:
ParseLogLevel("consensus:debug,mempool:debug,*:error", log.NewTMLogger(os.Stdout), "info")
Types ¶
This section is empty.