Documentation
¶
Index ¶
- Constants
- func AppendPrefix(signerPubKey []byte) []byte
- func CalculateTaskDelay(cliCtx cliContext.CLIContext) (bool, time.Duration)
- func CloseBridgeDBInstance()
- func CreateURLWithQuery(uri string, param map[string]interface{}) (string, error)
- func GetAccount(cliCtx cliContext.CLIContext) (account authTypes.Account, err error)
- func GetBridgeDBInstance(filePath string) *leveldb.DB
- func GetConfigManagerParams(cliCtx cliContext.CLIContext) (*chainManagerTypes.Params, error)
- func IsCatchingUp(cliCtx cliContext.CLIContext) bool
- func IsCurrentProposer(cliCtx cliContext.CLIContext) (bool, error)
- func IsEventSender(cliCtx cliContext.CLIContext, validatorID uint64) bool
- func IsInProposerList(cliCtx cliContext.CLIContext, count uint64) (bool, error)
- func IsProposer(cliCtx cliContext.CLIContext) (bool, error)
- func Logger() log.Logger
- func WaitForOneEvent(tx tmTypes.Tx, client *httpClient.HTTP) (tmTypes.TMEventData, error)
Constants ¶
const ( ChainSyncer = "chain-syncer" HeimdallCheckpointer = "heimdall-checkpointer" NoackService = "checkpoint-no-ack" SpanServiceStr = "span-service" ClerkServiceStr = "clerk-service" AMQPConsumerService = "amqp-consumer-service" AccountDetailsURL = "/auth/accounts/%v" LastNoAckURL = "/checkpoint/last-no-ack" CheckpointParamsURL = "/checkpoint/params" ChainManagerParamsURL = "/chainmanager/params" ProposersURL = "/staking/proposer/%v" BufferedCheckpointURL = "/checkpoint/buffer" LatestCheckpointURL = "/checkpoint/latest-checkpoint" CurrentProposerURL = "/staking/current-proposer" LatestSpanURL = "/bor/latest-span" NextSpanInfoURL = "/bor/prepare-next-span" DividendAccountRootURL = "/staking/dividend-account-root" ValidatorURL = "/staking/validator/%v" CurrentValidatorSetURL = "staking/validator-set" StakingTxStatusURL = "/staking/isoldtx" TopupTxStatusURL = "/topup/isoldtx" ClerkTxStatusURL = "/clerk/isoldtx" TransactionTimeout = 1 * time.Minute CommitTimeout = 2 * time.Minute TaskDelayBetweenEachVal = 3 * time.Second BridgeDBFlag = "bridge-db" )
Variables ¶
This section is empty.
Functions ¶
func AppendPrefix ¶
appendPrefix - returns publickey in uncompressed format
func CalculateTaskDelay ¶
func CalculateTaskDelay(cliCtx cliContext.CLIContext) (bool, time.Duration)
CalculateTaskDelay calculates delay required for current validator to propose the tx It solves for multiple validators sending same transaction.
func CloseBridgeDBInstance ¶
func CloseBridgeDBInstance()
CloseBridgeDBInstance closes bridge-db instance
func CreateURLWithQuery ¶
CreateURLWithQuery receives the uri and parameters in key value form it will return the new url with the given query from the parameter
func GetAccount ¶
func GetAccount(cliCtx cliContext.CLIContext) (account authTypes.Account, err error)
Returns heimdall auth account
func GetBridgeDBInstance ¶
GetBridgeDBInstance get sington object for bridge-db
func GetConfigManagerParams ¶
func GetConfigManagerParams(cliCtx cliContext.CLIContext) (*chainManagerTypes.Params, error)
GetConfigManagerParams return configManager params
func IsCatchingUp ¶
func IsCatchingUp(cliCtx cliContext.CLIContext) bool
IsCatchingUp checks if the heimdall node you are connected to is fully synced or not returns true when synced
func IsCurrentProposer ¶
func IsCurrentProposer(cliCtx cliContext.CLIContext) (bool, error)
IsCurrentProposer checks if we are current proposer
func IsEventSender ¶
func IsEventSender(cliCtx cliContext.CLIContext, validatorID uint64) bool
IsEventSender check if we are the EventSender
func IsInProposerList ¶
func IsInProposerList(cliCtx cliContext.CLIContext, count uint64) (bool, error)
IsInProposerList checks if we are in current proposer
func IsProposer ¶
func IsProposer(cliCtx cliContext.CLIContext) (bool, error)
IsProposer checks if we are proposer
func WaitForOneEvent ¶
func WaitForOneEvent(tx tmTypes.Tx, client *httpClient.HTTP) (tmTypes.TMEventData, error)
WaitForOneEvent subscribes to a websocket event for the given event time and returns upon receiving it one time, or when the timeout duration has expired.
This handles subscribing and unsubscribing under the hood
Types ¶
This section is empty.