-
-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: clean up single-used functions in Electra (#7132)
* chore: clean up single-used function * Remove Uint8Array * Present state-transition constants in Uint8Array
- Loading branch information
Showing
6 changed files
with
39 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
export const ZERO_HASH = Buffer.alloc(32, 0); | ||
export const EMPTY_SIGNATURE = Buffer.alloc(96, 0); | ||
export const ZERO_HASH = new Uint8Array(32).fill(0); | ||
export const EMPTY_SIGNATURE = new Uint8Array(96).fill(0); | ||
export const SECONDS_PER_DAY = 86400; | ||
export const BASE_REWARDS_PER_EPOCH = 4; | ||
export const G2_POINT_AT_INFINITY = Buffer.from( | ||
"c000000000000000000000000000000000000000000000000000000000000000" + | ||
"0000000000000000000000000000000000000000000000000000000000000000" + | ||
"0000000000000000000000000000000000000000000000000000000000000000", | ||
"hex" | ||
export const G2_POINT_AT_INFINITY = new Uint8Array( | ||
Buffer.from( | ||
"c000000000000000000000000000000000000000000000000000000000000000" + | ||
"0000000000000000000000000000000000000000000000000000000000000000" + | ||
"0000000000000000000000000000000000000000000000000000000000000000", | ||
"hex" | ||
) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters