Class DuplicateVoteEvidence
Represents a evidence of duplicate vote on consensus.
Inherited Members
Namespace: Libplanet.Types.Evidence
Assembly: Libplanet.Types.dll
Syntax
public class DuplicateVoteEvidence : EvidenceBase
Constructors
| Improve this Doc View SourceDuplicateVoteEvidence(IValue)
Creates a DuplicateVoteEvidence instance from
bencoded
Declaration
public DuplicateVoteEvidence(IValue bencoded)
Parameters
Type | Name | Description |
---|---|---|
IValue | bencoded | Bencoded |
DuplicateVoteEvidence(Vote, Vote, ValidatorSet, DateTimeOffset)
Creates a DuplicateVoteEvidence instance.
Declaration
public DuplicateVoteEvidence(Vote voteRef, Vote voteDup, ValidatorSet validatorSet, DateTimeOffset timestamp)
Parameters
Type | Name | Description |
---|---|---|
Vote | voteRef | Reference vote of conflicting Votes. |
Vote | voteDup | Duplicated vote of conflicting Votes. |
ValidatorSet | validatorSet | ValidatorSet from block of conflicting votes has been made. |
DateTimeOffset | timestamp | The timestamp of evidence. |
Properties
| Improve this Doc View SourceTotalPower
Total power of validators at the time that infraction has been occurred.
Declaration
public BigInteger TotalPower { get; }
Property Value
Type | Description |
---|---|
BigInteger |
ValidatorPower
Consensus power of validator that committed infraction at the time that infraction has been occurred.
Declaration
public BigInteger ValidatorPower { get; }
Property Value
Type | Description |
---|---|
BigInteger |
VoteDup
The duplicated vote of conflicting votes.
Declaration
public Vote VoteDup { get; }
Property Value
Type | Description |
---|---|
Vote |
VoteRef
The reference vote of conflicting votes.
Declaration
public Vote VoteRef { get; }
Property Value
Type | Description |
---|---|
Vote |
Methods
| Improve this Doc View SourceEquals(DuplicateVoteEvidence)
Represents a evidence of duplicate vote on consensus.
Declaration
public bool Equals(DuplicateVoteEvidence other)
Parameters
Type | Name | Description |
---|---|---|
DuplicateVoteEvidence | other |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Nullable<Object>)
Represents a evidence of duplicate vote on consensus.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Object> | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceGetHashCode()
Represents a evidence of duplicate vote on consensus.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
| Improve this Doc View SourceOnBencoded(Dictionary)
Represents a evidence of duplicate vote on consensus.
Declaration
protected override Dictionary OnBencoded(Dictionary dictionary)
Parameters
Type | Name | Description |
---|---|---|
Dictionary | dictionary |
Returns
Type | Description |
---|---|
Dictionary |
Overrides
| Improve this Doc View SourceOnVerify(IEvidenceContext)
Represents a evidence of duplicate vote on consensus.
Declaration
protected override void OnVerify(IEvidenceContext evidenceContext)
Parameters
Type | Name | Description |
---|---|---|
IEvidenceContext | evidenceContext |
Overrides
| Improve this Doc View SourceOrderDuplicateVotePair(Vote, Vote)
Represents a evidence of duplicate vote on consensus.
Declaration
public static (Vote, Vote) OrderDuplicateVotePair(Vote voteRef, Vote voteDup)
Parameters
Type | Name | Description |
---|---|---|
Vote | voteRef | |
Vote | voteDup |
Returns
Type | Description |
---|---|
System.ValueTuple<Vote, Vote> |