Documentation ¶
Index ¶
- Constants
- Variables
- func BuildBaseVoteDataFromEvent(event terderminttypes.Event) (voteID string, voteDeadline uint64, err error)
- func BuildRelayDataFromVoteParams(voteParams *VoteParams) *pairingtypes.RelayPrivateData
- type ChainTrackerInf
- type ReliabilityManager
- func (rm *ReliabilityManager) GetLatestBlockData(fromBlock, toBlock, specificBlock int64) (latestBlock int64, requestedHashes []*chaintracker.BlockStore, ...)
- func (rm *ReliabilityManager) GetLatestBlockNum() (int64, time.Time)
- func (rm *ReliabilityManager) VoteHandler(voteParams *VoteParams, nodeHeight uint64) error
- type TxSender
- type VoteData
- type VoteParams
Constants ¶
View Source
const ( DetectionVoteType = 0 RevealVoteType = 1 CloseVoteType = 2 )
Variables ¶
View Source
var NoVoteDeadline = sdkerrors.New("Not Connected Error", 800, "No Connection To grpc server")
Functions ¶
func BuildBaseVoteDataFromEvent ¶
func BuildBaseVoteDataFromEvent(event terderminttypes.Event) (voteID string, voteDeadline uint64, err error)
func BuildRelayDataFromVoteParams ¶
func BuildRelayDataFromVoteParams(voteParams *VoteParams) *pairingtypes.RelayPrivateData
Types ¶
type ChainTrackerInf ¶
type ReliabilityManager ¶
type ReliabilityManager struct {
// contains filtered or unexported fields
}
func NewReliabilityManager ¶
func NewReliabilityManager(chainTracker ChainTrackerInf, txSender TxSender, publicAddress string, chainRouter chainlib.ChainRouter, chainParser chainlib.ChainParser) *ReliabilityManager
func (*ReliabilityManager) GetLatestBlockData ¶
func (rm *ReliabilityManager) GetLatestBlockData(fromBlock, toBlock, specificBlock int64) (latestBlock int64, requestedHashes []*chaintracker.BlockStore, changeTime time.Time, err error)
func (*ReliabilityManager) GetLatestBlockNum ¶
func (rm *ReliabilityManager) GetLatestBlockNum() (int64, time.Time)
func (*ReliabilityManager) VoteHandler ¶
func (rm *ReliabilityManager) VoteHandler(voteParams *VoteParams, nodeHeight uint64) error
type VoteParams ¶
type VoteParams struct { CloseVote bool ChainID string ApiURL string RequestData []byte RequestBlock uint64 Voters []string ConnectionType string ApiInterface string VoteDeadline uint64 VoteID string ParamsType uint Metadata []pairingtypes.Metadata }
func BuildVoteParamsFromDetectionEvent ¶
func BuildVoteParamsFromDetectionEvent(event terderminttypes.Event) (*VoteParams, error)
func (*VoteParams) GetCloseVote ¶
func (vp *VoteParams) GetCloseVote() bool
Click to show internal directories.
Click to hide internal directories.