Skip to content

Commit

Permalink
refactor: Ensure compatibility with protobuf standards and improve lo…
Browse files Browse the repository at this point in the history
…gical clarity

-Updated the AccountStatus enum to align with protobuf best practices by replacing uint8_t with uint32, adhering to the proto3 syntax conventions for type compatibility and consistency.
-Refactored the Decimal message by correcting the field numbering for denominator to avoid duplicate field identifiers, setting its default value to 1 to prevent unintended division issues.
These changes ensure compliance with Celestia's contributing guidelines, maintain logical clarity, and uphold high engineering standards for maintainability and functionality.
  • Loading branch information
Himess authored Dec 13, 2024
1 parent eedbbd5 commit 3ef2eba
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions specs/src/proto/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ message AvailableDataHeader {

// https://github.com/celestiaorg/celestia-specs/blob/master/specs/networking.md#account
// AccountStatus
enum AccountStatus : uint8_t {
None = 1,
DelegationBonded = 2,
DelegationUnbonding = 3,
ValidatorQueued = 4,
ValidatorBonded = 5,
ValidatorUnbonding = 6,
ValidatorUnbonded = 7,
enum AccountStatus {
None = 1;
DelegationBonded = 2;
DelegationUnbonding = 3;
ValidatorQueued = 4;
ValidatorBonded = 5;
ValidatorUnbonding = 6;
ValidatorUnbonded = 7;
}

// https://github.com/celestiaorg/celestia-specs/blob/master/specs/networking.md#periodentry
Expand All @@ -63,7 +63,7 @@ message Decimal {
// Rational numerator
uint64 numerator = 1;
// Rational denominator
uint64 denominator = 1;
uint64 denominator = 2;
}

// https://github.com/celestiaorg/celestia-specs/blob/master/specs/networking.md#messagepaid
Expand Down

0 comments on commit 3ef2eba

Please sign in to comment.