Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(grpc): add change proposer vote types for gRPC proto types #1700

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions consensus/cp_decide.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type cpDecideState struct {

func (s *cpDecideState) enter() {
s.decide()
s.cpStrongTermination(s.round, s.cpRound)
}

func (s *cpDecideState) decide() {
Expand Down
1 change: 1 addition & 0 deletions consensus/cp_mainvote.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type cpMainVoteState struct {

func (s *cpMainVoteState) enter() {
s.decide()
s.cpStrongTermination(s.round, s.cpRound)
}

func (s *cpMainVoteState) decide() {
Expand Down
8 changes: 6 additions & 2 deletions www/grpc/gen/dart/blockchain.pbenum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ class VoteType extends $pb.ProtobufEnum {
static const VoteType VOTE_UNKNOWN = VoteType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_UNKNOWN');
static const VoteType VOTE_PREPARE = VoteType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_PREPARE');
static const VoteType VOTE_PRECOMMIT = VoteType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_PRECOMMIT');
static const VoteType VOTE_CHANGE_PROPOSER = VoteType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_CHANGE_PROPOSER');
static const VoteType VOTE_CP_PRE_VOTE = VoteType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_CP_PRE_VOTE');
static const VoteType VOTE_CP_MAIN_VOTE = VoteType._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_CP_MAIN_VOTE');
static const VoteType VOTE_CP_DECIDED = VoteType._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_CP_DECIDED');

static const $core.List<VoteType> values = <VoteType> [
VOTE_UNKNOWN,
VOTE_PREPARE,
VOTE_PRECOMMIT,
VOTE_CHANGE_PROPOSER,
VOTE_CP_PRE_VOTE,
VOTE_CP_MAIN_VOTE,
VOTE_CP_DECIDED,
];

static final $core.Map<$core.int, VoteType> _byValue = $pb.ProtobufEnum.initByValue(values);
Expand Down
6 changes: 4 additions & 2 deletions www/grpc/gen/dart/blockchain.pbjson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ const VoteType$json = const {
const {'1': 'VOTE_UNKNOWN', '2': 0},
const {'1': 'VOTE_PREPARE', '2': 1},
const {'1': 'VOTE_PRECOMMIT', '2': 2},
const {'1': 'VOTE_CHANGE_PROPOSER', '2': 3},
const {'1': 'VOTE_CP_PRE_VOTE', '2': 3},
const {'1': 'VOTE_CP_MAIN_VOTE', '2': 4},
const {'1': 'VOTE_CP_DECIDED', '2': 5},
],
};

/// Descriptor for `VoteType`. Decode as a `google.protobuf.EnumDescriptorProto`.
final $typed_data.Uint8List voteTypeDescriptor = $convert.base64Decode('CghWb3RlVHlwZRIQCgxWT1RFX1VOS05PV04QABIQCgxWT1RFX1BSRVBBUkUQARISCg5WT1RFX1BSRUNPTU1JVBACEhgKFFZPVEVfQ0hBTkdFX1BST1BPU0VSEAM=');
final $typed_data.Uint8List voteTypeDescriptor = $convert.base64Decode('CghWb3RlVHlwZRIQCgxWT1RFX1VOS05PV04QABIQCgxWT1RFX1BSRVBBUkUQARISCg5WT1RFX1BSRUNPTU1JVBACEhQKEFZPVEVfQ1BfUFJFX1ZPVEUQAxIVChFWT1RFX0NQX01BSU5fVk9URRAEEhMKD1ZPVEVfQ1BfREVDSURFRBAF');
@$core.Deprecated('Use getAccountRequestDescriptor instead')
const GetAccountRequest$json = const {
'1': 'GetAccountRequest',
Expand Down
4 changes: 3 additions & 1 deletion www/grpc/gen/docs/grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -1829,7 +1829,9 @@ committee.
<li>VOTE_UNKNOWN = 0 (Unknown vote type.)</li>
<li>VOTE_PREPARE = 1 (Prepare vote type.)</li>
<li>VOTE_PRECOMMIT = 2 (Precommit vote type.)</li>
<li>VOTE_CHANGE_PROPOSER = 3 (Change proposer vote type.)</li>
<li>VOTE_CP_PRE_VOTE = 3 (Change-proposer:pre-vote vote type.)</li>
<li>VOTE_CP_MAIN_VOTE = 4 (change-proposer:main-vote vote type.)</li>
<li>VOTE_CP_DECIDED = 5 (change-proposer:decided vote type.)</li>
</ul>
</td>
</tr>
Expand Down
4 changes: 3 additions & 1 deletion www/grpc/gen/docs/json-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -1880,7 +1880,9 @@ committee.
<li>VOTE_UNKNOWN = 0 (Unknown vote type.)</li>
<li>VOTE_PREPARE = 1 (Prepare vote type.)</li>
<li>VOTE_PRECOMMIT = 2 (Precommit vote type.)</li>
<li>VOTE_CHANGE_PROPOSER = 3 (Change proposer vote type.)</li>
<li>VOTE_CP_PRE_VOTE = 3 (Change-proposer:pre-vote vote type.)</li>
<li>VOTE_CP_MAIN_VOTE = 4 (change-proposer:main-vote vote type.)</li>
<li>VOTE_CP_DECIDED = 5 (change-proposer:decided vote type.)</li>
</ul>
</td>
</tr>
Expand Down
Loading
Loading