Documentation ¶
Index ¶
- type BlockDetailsResponse
- type ChartInfo
- type ConnectionInfo
- type ContractCounter
- type ContractJson
- type ContractTableRow
- type CrawledABI
- type CreateNetworkScriptArgs
- type DecodeFailure
- type GetGenesisResponse
- type GetNmcAddressResponse
- type IPList
- type IstanbulStats
- type JoinNetworkRequest
- type JoinNetworkResponse
- type JoinNetworkScriptArgs
- type LatencyResponse
- type LatestBlockResponse
- type Logs
- type MailServerConfig
- type NodeInfo
- type NodeList
- type NodeServiceImpl
- func (nsi *NodeServiceImpl) ABICrawler(url string)
- func (nsi *NodeServiceImpl) CheckGethStatus(url string) bool
- func (nsi *NodeServiceImpl) ContractCount() ContractCounter
- func (nsi *NodeServiceImpl) ContractCrawler(url string)
- func (nsi *NodeServiceImpl) ContractDetailsUpdateHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) ContractList() []ContractTableRow
- func (nsi *NodeServiceImpl) CreateAccountHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) DeployContractHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) DirectoryCrawl()
- func (nsi *NodeServiceImpl) GetAccountsHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) GetBlockInfoHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) GetChartData(url string) []ChartInfo
- func (nsi *NodeServiceImpl) GetChartDataHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) GetContractCountHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) GetContractListHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) GetCurrentNodeHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) GetGenesisHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) GetLatestBlockInfoHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) GetLatestTransactionInfoHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) GetNmcAddress(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) GetOtherPeerHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) GetStatistics(from int64, to int64) (*IstanbulStats, error)
- func (nsi *NodeServiceImpl) GetTransactionInfoHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) GetTransactionReceiptHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) InitInternalContract(url string)
- func (nsi *NodeServiceImpl) JoinRequestResponseHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) LatencyHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) LatestBlockHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) LogCleanerGeth()
- func (nsi *NodeServiceImpl) LogRotaterConst()
- func (nsi *NodeServiceImpl) LogRotaterGeth()
- func (nsi *NodeServiceImpl) NetworkManagerContractDeployer(url string)
- func (nsi *NodeServiceImpl) Notary(privateKey *ecdsa.PrivateKey)
- func (nsi *NodeServiceImpl) OptionsHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) ProposeValidator(event *litionScClient.LitionScClientAccountMining)
- func (nsi *NodeServiceImpl) RegisterNodeDetails(url string)
- func (nsi *NodeServiceImpl) TransactionSearchHandler(w http.ResponseWriter, r *http.Request)
- func (nsi *NodeServiceImpl) UnvoteValidatorInternal(validatorAddress string)
- func (nsi *NodeServiceImpl) UpdateLastMainnetNotary(event *litionScClient.LitionScClientNotary)
- type PendingRequests
- type SuccessResponse
- type SuccessResponseBool
- type TransactionDetailsResponse
- type TransactionReceiptResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockDetailsResponse ¶
type BlockDetailsResponse struct { Number int64 `json:"number"` Hash string `json:"hash"` ParentHash string `json:"parentHash"` Nonce string `json:"nonce"` Sha3Uncles string `json:"sha3Uncles"` LogsBloom string `json:"logsBloom"` TransactionsRoot string `json:"transactionsRoot"` StateRoot string `json:"stateRoot"` Miner string `json:"miner"` Difficulty int64 `json:"difficulty"` TotalDifficulty int64 `json:"totalDifficulty"` ExtraData string `json:"extraData"` Size int64 `json:"size"` GasLimit int64 `json:"gasLimit"` GasUsed int64 `json:"gasUsed"` Timestamp int64 `json:"timestamp"` Transactions []TransactionDetailsResponse `json:"transactions"` Uncles []string `json:"uncles"` TimeElapsed int64 `json:"TimeElapsed"` }
type ConnectionInfo ¶
type ContractCounter ¶
type ContractJson ¶
type ContractTableRow ¶
type CrawledABI ¶
type CreateNetworkScriptArgs ¶
type CreateNetworkScriptArgs struct { Nodename string `json:"nodename,omitempty"` CurrentIP string `json:"currentIP,omitempty"` RPCPort string `json:"rpcPort,omitempty"` WhisperPort string `json:"whisperPort,omitempty"` ConstellationPort string `json:"constellationPort,omitempty"` NodeManagerPort string `json:"nodeManagerPort,omitempty"` }
type DecodeFailure ¶
type GetGenesisResponse ¶
type GetNmcAddressResponse ¶
type GetNmcAddressResponse struct {
ContstellationPort string `json:"nmcAddress"`
}
type IPList ¶
type IPList struct { WhiteList []string `json:"whiteList"` ConnectedList []connectedIP `json:"connectedList"` }
type IstanbulStats ¶
type JoinNetworkRequest ¶
type JoinNetworkResponse ¶
type JoinNetworkScriptArgs ¶
type JoinNetworkScriptArgs struct { Nodename string `json:"nodename,omitempty"` CurrentIP string `json:"currentIP,omitempty"` RPCPort string `json:"rpcPort,omitempty"` WhisperPort string `json:"whisperPort,omitempty"` ConstellationPort string `json:"constellationPort,omitempty"` NodeManagerPort string `json:"nodeManagerPort,omitempty"` MasterNodeManagerPort string `json:"masterNodeManagerPort,omitempty"` MasterIP string `json:"masterIP,omitempty"` }
type LatencyResponse ¶
type LatestBlockResponse ¶
type Logs ¶
type Logs struct { Address string `json:"address"` BlockHash string `json:"blockHash"` BlockNumber int64 `json:"blockNumber"` Data string `json:"data"` LogIndex int64 `json:"logIndex"` Topics []string `json:"topics"` TransactionHash string `json:"transactionHash"` TransactionIndex int64 `json:"transactionIndex"` }
type MailServerConfig ¶
type NodeInfo ¶
type NodeInfo struct { NodeName string `json:"nodeName"` NodeCount int `json:"nodeCount"` TotalNodeCount int `json:"totalNodeCount"` Active string `json:"active"` ConnectionInfo ConnectionInfo `json:"connectionInfo"` Role string `json:"role"` BlockNumber int64 `json:"blockNumber"` PendingTxCount int `json:"pendingTxCount"` AdminInfo client.AdminInfo `json:"adminInfo"` ChainId int `json:"chainId"` }
type NodeServiceImpl ¶
type NodeServiceImpl struct { Url string LitionContractClient *litionScClient.ContractClient NodeAccAddress string MiningRegisteredChan chan struct{} MiningRegistered bool NotaryPeriod int64 Nms *contractclient.NetworkMapContractClient LastInternalNotary int64 LastLitionScNotaryBlock int64 LastProcessedNotaryBlock int64 NotaryInvokedCounter uint32 }
func NewNodeServiceImpl ¶
func NewNodeServiceImpl(url string, litionContractClient *litionScClient.ContractClient, nodeAccAddress string, nms *contractclient.NetworkMapContractClient) (*NodeServiceImpl, error)
func (*NodeServiceImpl) ABICrawler ¶
func (nsi *NodeServiceImpl) ABICrawler(url string)
func (*NodeServiceImpl) CheckGethStatus ¶
func (nsi *NodeServiceImpl) CheckGethStatus(url string) bool
func (*NodeServiceImpl) ContractCount ¶
func (nsi *NodeServiceImpl) ContractCount() ContractCounter
func (*NodeServiceImpl) ContractCrawler ¶
func (nsi *NodeServiceImpl) ContractCrawler(url string)
func (*NodeServiceImpl) ContractDetailsUpdateHandler ¶
func (nsi *NodeServiceImpl) ContractDetailsUpdateHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) ContractList ¶
func (nsi *NodeServiceImpl) ContractList() []ContractTableRow
func (*NodeServiceImpl) CreateAccountHandler ¶
func (nsi *NodeServiceImpl) CreateAccountHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) DeployContractHandler ¶
func (nsi *NodeServiceImpl) DeployContractHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) DirectoryCrawl ¶
func (nsi *NodeServiceImpl) DirectoryCrawl()
func (*NodeServiceImpl) GetAccountsHandler ¶
func (nsi *NodeServiceImpl) GetAccountsHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) GetBlockInfoHandler ¶
func (nsi *NodeServiceImpl) GetBlockInfoHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) GetChartData ¶
func (nsi *NodeServiceImpl) GetChartData(url string) []ChartInfo
func (*NodeServiceImpl) GetChartDataHandler ¶
func (nsi *NodeServiceImpl) GetChartDataHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) GetContractCountHandler ¶
func (nsi *NodeServiceImpl) GetContractCountHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) GetContractListHandler ¶
func (nsi *NodeServiceImpl) GetContractListHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) GetCurrentNodeHandler ¶
func (nsi *NodeServiceImpl) GetCurrentNodeHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) GetGenesisHandler ¶
func (nsi *NodeServiceImpl) GetGenesisHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) GetLatestBlockInfoHandler ¶
func (nsi *NodeServiceImpl) GetLatestBlockInfoHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) GetLatestTransactionInfoHandler ¶
func (nsi *NodeServiceImpl) GetLatestTransactionInfoHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) GetNmcAddress ¶
func (nsi *NodeServiceImpl) GetNmcAddress(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) GetOtherPeerHandler ¶
func (nsi *NodeServiceImpl) GetOtherPeerHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) GetStatistics ¶
func (nsi *NodeServiceImpl) GetStatistics(from int64, to int64) (*IstanbulStats, error)
func (*NodeServiceImpl) GetTransactionInfoHandler ¶
func (nsi *NodeServiceImpl) GetTransactionInfoHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) GetTransactionReceiptHandler ¶
func (nsi *NodeServiceImpl) GetTransactionReceiptHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) InitInternalContract ¶
func (nsi *NodeServiceImpl) InitInternalContract(url string)
func (*NodeServiceImpl) JoinRequestResponseHandler ¶
func (nsi *NodeServiceImpl) JoinRequestResponseHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) LatencyHandler ¶
func (nsi *NodeServiceImpl) LatencyHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) LatestBlockHandler ¶
func (nsi *NodeServiceImpl) LatestBlockHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) LogCleanerGeth ¶
func (nsi *NodeServiceImpl) LogCleanerGeth()
func (*NodeServiceImpl) LogRotaterConst ¶
func (nsi *NodeServiceImpl) LogRotaterConst()
func (*NodeServiceImpl) LogRotaterGeth ¶
func (nsi *NodeServiceImpl) LogRotaterGeth()
@TODO: Implement logrotate command to do this.
func (*NodeServiceImpl) NetworkManagerContractDeployer ¶
func (nsi *NodeServiceImpl) NetworkManagerContractDeployer(url string)
func (*NodeServiceImpl) Notary ¶
func (nsi *NodeServiceImpl) Notary(privateKey *ecdsa.PrivateKey)
func (*NodeServiceImpl) OptionsHandler ¶
func (nsi *NodeServiceImpl) OptionsHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) ProposeValidator ¶
func (nsi *NodeServiceImpl) ProposeValidator(event *litionScClient.LitionScClientAccountMining)
This wrapper is used in event listener for automatic voting
func (*NodeServiceImpl) RegisterNodeDetails ¶
func (nsi *NodeServiceImpl) RegisterNodeDetails(url string)
func (*NodeServiceImpl) TransactionSearchHandler ¶
func (nsi *NodeServiceImpl) TransactionSearchHandler(w http.ResponseWriter, r *http.Request)
func (*NodeServiceImpl) UnvoteValidatorInternal ¶
func (nsi *NodeServiceImpl) UnvoteValidatorInternal(validatorAddress string)
func (*NodeServiceImpl) UpdateLastMainnetNotary ¶
func (nsi *NodeServiceImpl) UpdateLastMainnetNotary(event *litionScClient.LitionScClientNotary)
type PendingRequests ¶
type SuccessResponse ¶
type SuccessResponse struct {
Status string `json:"statusMessage"`
}
type SuccessResponseBool ¶
type SuccessResponseBool struct {
Status bool `json:"statusMessage"`
}
type TransactionDetailsResponse ¶
type TransactionDetailsResponse struct { BlockHash string `json:"blockHash"` BlockNumber int64 `json:"blockNumbe"` From string `json:"from"` Gas int64 `json:"gas"` GasPrice int64 `json:"gasPrice"` Hash string `json:"hash"` Input string `json:"input"` Nonce int64 `json:"nonce"` To string `json:"to"` TransactionIndex int64 `json:"transactionIndex"` Value int64 `json:"value"` V string `json:"v"` R string `json:"r"` S string `json:"s"` TransactionType string `json:"transactionType"` TimeElapsed int64 `json:"TimeElapsed"` }
func ConvertToReadable ¶
func ConvertToReadable(p client.TransactionDetailsResponse, pending bool, hash bool) TransactionDetailsResponse
type TransactionReceiptResponse ¶
type TransactionReceiptResponse struct { BlockHash string `json:"blockHash"` BlockNumber int64 `json:"blockNumber"` ContractAddress string `json:"contractAddress"` CumulativeGasUsed int64 `json:"cumulativeGasUsed"` From string `json:"from"` Gas int64 `json:"gas"` GasPrice int64 `json:"gasPrice"` GasUsed int64 `json:"gasUsed"` Input string `json:"input"` Logs []Logs `json:"logs"` LogsBloom string `json:"logsBloom"` Nonce int64 `json:"nonce"` Root string `json:"root"` To string `json:"to"` TransactionHash string `json:"transactionHash"` TransactionIndex int64 `json:"transactionIndex"` Value int64 `json:"value"` V string `json:"v"` R string `json:"r"` S string `json:"s"` TransactionType string `json:"transactionType"` TimeElapsed int64 `json:"TimeElapsed"` DecodedInputs []contractclient.ParamTableRow `json:"decodedInputs,omitempty"` FunctionDetails string `json:"functionDetails,omitempty"` DecodeFailed DecodeFailure `json:"decodeFailed,omitempty"` }
Click to show internal directories.
Click to hide internal directories.