Documentation ¶
Index ¶
- Constants
- Variables
- func AsyncLogElectionTx() *time.Ticker
- func CSCoinToMoneyValue(csCoinValue *hexutil.Big) (string, error)
- func CheckAndChangeHexToAddress(address string) (common.Address, error)
- func CheckDownloaderSyncStatus()
- func CheckRegistration() bool
- func DecimalToInter(src string, unitBit int) (*big.Int, error)
- func InitAccountInfo(nodeType int, path, password, passPharse string)
- func InitRpcClient(port int)
- func InterToDecimal(csCoinValue *hexutil.Big, unitBit int) (string, error)
- func MoneyValueToCSCoin(moneyValue string) (*big.Int, error)
- func ParseWalletPathAndName(inputPath string) (path, name string)
- func PrintDefaultAccountStake()
- func RecordRegistration(txHash string)
- func RemoveRegistration()
- func RpcCall(c *cli.Context)
- type RpcClient
Constants ¶
View Source
const ( VerifierStatusNoRegistered = "Not Registered" VerifierStatusRegistered = "Registered" VerifiedStatusCanceled = "Canceled" VerifiedStatusUnstaked = "Unstaked" )
Variables ¶
View Source
var (
CheckSyncStatusDuration = time.Second * 3
)
View Source
var CliCommands = []cli.Command{ { Name: "quit", Aliases: []string{"exit"}, Usage: "quit", Action: func(c *cli.Context) error { os.Exit(0) return cli.NewExitError("", 0) }, Hidden: false, HideHelp: false, }, { Name: "rpc", Aliases: []string{"r"}, Usage: "control node", Flags: rpcFlags, Action: func(c *cli.Context) error { RpcCall(c) return nil }, }, }
View Source
var InnerRpcForbid = false
View Source
var SyncStatus atomic.Value
Functions ¶
func AsyncLogElectionTx ¶
func CSCoinToMoneyValue ¶
CSCoin to money Value
func CheckAndChangeHexToAddress ¶
check address format
func CheckRegistration ¶
func CheckRegistration() bool
func InitAccountInfo ¶
func InitRpcClient ¶
func InitRpcClient(port int)
func MoneyValueToCSCoin ¶
check and change input money value input money unit is DIP
func ParseWalletPathAndName ¶
func PrintDefaultAccountStake ¶
func PrintDefaultAccountStake()
func RecordRegistration ¶
func RecordRegistration(txHash string)
if user applies for registering verifier, record, creating a file in $Home/.dipperin for startup check, quit if node type is not verifier
Types ¶
Click to show internal directories.
Click to hide internal directories.