Class VoteSetBits
A class used to requests lacking votes by sending Votes that the peer has.
Implements
Inherited Members
Namespace: Libplanet.Consensus
Assembly: Libplanet.dll
Syntax
public class VoteSetBits : IEquatable<VoteSetBits>
Constructors
| Improve this Doc View SourceVoteSetBits(Dictionary)
A class used to requests lacking votes by sending Votes that the peer has.
Declaration
public VoteSetBits(Dictionary encoded)
Parameters
Type | Name | Description |
---|---|---|
Bencodex.Types.Dictionary | encoded |
VoteSetBits(VoteSetBitsMetadata, ImmutableArray<Byte>)
Instantiates a VoteSetBits with given
voteSetBitsMetadata
and its signature
.
Declaration
public VoteSetBits(VoteSetBitsMetadata voteSetBitsMetadata, ImmutableArray<byte> signature)
Parameters
Type | Name | Description |
---|---|---|
VoteSetBitsMetadata | voteSetBitsMetadata | A VoteSetBitsMetadata to request. |
ImmutableArray<Byte> | signature | A signature signed with |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if given |
ArgumentException | Thrown if given |
VoteSetBits(Byte[])
A class used to requests lacking votes by sending Votes that the peer has.
Declaration
public VoteSetBits(byte[] marshaled)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | marshaled |
Properties
| Improve this Doc View SourceBlockHash
The BlockHash of the votes in the vote sets.
Declaration
public BlockHash BlockHash { get; }
Property Value
Type | Description |
---|---|
BlockHash |
ByteArray
Byte encoded VoteSetBits data.
Declaration
public ImmutableArray<byte> ByteArray { get; }
Property Value
Type | Description |
---|---|
ImmutableArray<Byte> |
Encoded
A Bencodex-encoded value of VoteSetBits.
Declaration
[JsonIgnore]
public Dictionary Encoded { get; }
Property Value
Type | Description |
---|---|
Bencodex.Types.Dictionary |
Flag
The VoteFlag of the votes in the vote set.
Declaration
public VoteFlag Flag { get; }
Property Value
Type | Description |
---|---|
VoteFlag |
Height
A height of the votes in the given vote set.
Declaration
public long Height { get; }
Property Value
Type | Description |
---|---|
Int64 |
Round
A round of the votes in the given vote set.
Declaration
public int Round { get; }
Property Value
Type | Description |
---|---|
Int32 |
Signature
A signature that signed with VoteSetBitsMetadata.
Declaration
public ImmutableArray<byte> Signature { get; }
Property Value
Type | Description |
---|---|
ImmutableArray<Byte> |
Timestamp
The time at which the set is created.
Declaration
public DateTimeOffset Timestamp { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset |
ValidatorPublicKey
A PublicKey of the vote set.
Declaration
public PublicKey ValidatorPublicKey { get; }
Property Value
Type | Description |
---|---|
PublicKey |
VoteBits
Booleans of the vote set to be .
Declaration
public ImmutableArray<bool> VoteBits { get; }
Property Value
Type | Description |
---|---|
ImmutableArray<Boolean> |
Methods
| Improve this Doc View SourceEquals(VoteSetBits)
A class used to requests lacking votes by sending Votes that the peer has.
Declaration
[Pure]
public bool Equals(VoteSetBits other)
Parameters
Type | Name | Description |
---|---|---|
VoteSetBits | other |
Returns
Type | Description |
---|---|
Boolean |
Equals(Object)
A class used to requests lacking votes by sending Votes that the peer has.
Declaration
[Pure]
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceGetHashCode()
A class used to requests lacking votes by sending Votes that the peer has.
Declaration
[Pure]
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceToByteArray()
A class used to requests lacking votes by sending Votes that the peer has.
Declaration
public byte[] ToByteArray()
Returns
Type | Description |
---|---|
Byte[] |
Verify()
Verifies whether the VoteSetBitsMetadata is properly signed by Validator.
Declaration
[Pure]
public bool Verify()
Returns
Type | Description |
---|---|
Boolean | true if the Signature is not empty and is a valid signature signed by Validator. |