Closed hoank101 closed 1 week ago
The recent updates in the repository focus on renaming specific methods and constants to enhance clarity and introduce more explicit naming. Additional test cases have been added to improve robustness, primarily using require.Equal
and require.NoError
assertions. The changes incorporate updated naming conventions for functions and constants, particularly in the areas of Merkle tree handling, Ethereum JWT processing, and chain specification management.
File | Change Summary |
---|---|
mod/primitives/pkg/chain/helpers.go |
Renamed methods for determining the active fork version based on slot or epoch. |
mod/primitives/pkg/eip4844/blob_test.go |
Added test functions for unmarshaling JSON data into Blob type and marshaling Blob type to text format. |
mod/primitives/pkg/merkle/hasher_test.go |
Replaced direct equality checks with require assertions from the errors package. Added new test cases for TestNewRootWithDepth . |
mod/primitives/pkg/merkle/tree.go |
Renamed NewTreeFromLeaves function to NewTreeFromLeavesWithDepth to reflect the addition of a depth parameter. |
mod/primitives/pkg/net/jwt/jwt.go |
Renamed JWTLength to EthereumJWTLength to specify the naming convention related to Ethereum. |
Amidst the code where bytes do flow,
A change of names, in the repo's glow.
Functions refined, clearer paths they show,
With tests robust, where data meets the row.
Our code's a tree, with depth to grow,
🌳 In Ethereum's light, our JWT hearts glow. 💫
Summary by CodeRabbit
Bug Fixes
require.Equal
andrequire.NoError
for better error handling.TestNewRootWithDepth
to cover various scenarios.Refactor
ActiveForkVersionForSlot
,ActiveForkVersionForEpoch
,NewTreeFromLeavesWithDepth
, andEthereumJWTLength
.Tests
Blob
type to ensure correct JSON unmarshaling and text marshaling.