Skip to content

Commit

Permalink
Unexport hash functions
Browse files Browse the repository at this point in the history
  • Loading branch information
kirugan committed Jan 8, 2025
1 parent 9240bed commit cf5fc5d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ func blockHash(b *Block, stateDiff *StateDiff, network *utils.Network, overrideS
// if block.version >= 0.13.4
v0_13_4 := semver.MustParse("0.13.4")
if blockVer.GreaterThanEqual(v0_13_4) {
return Post0134Hash(b, stateDiff)
return post0134Hash(b, stateDiff)
}

Check warning on line 146 in core/block.go

View check run for this annotation

Codecov / codecov/patch

core/block.go#L145-L146

Added lines #L145 - L146 were not covered by tests

// if 0.13.2 <= block.version < 0.13.4
v0_13_2 := semver.MustParse("0.13.2")
if blockVer.GreaterThanEqual(v0_13_2) {
return Post0132Hash(b, stateDiff)
return post0132Hash(b, stateDiff)
}

// following statements applied only if block.version < 0.13.2
Expand Down Expand Up @@ -181,7 +181,7 @@ func pre07Hash(b *Block, chain *felt.Felt) (*felt.Felt, *BlockCommitments, error
), &BlockCommitments{TransactionCommitment: txCommitment}, nil
}

func Post0134Hash(b *Block, stateDiff *StateDiff) (*felt.Felt, *BlockCommitments, error) {
func post0134Hash(b *Block, stateDiff *StateDiff) (*felt.Felt, *BlockCommitments, error) {
wg := conc.NewWaitGroup()
var txCommitment, eCommitment, rCommitment, sdCommitment *felt.Felt
var sdLength uint64
Expand Down Expand Up @@ -248,7 +248,7 @@ func Post0134Hash(b *Block, stateDiff *StateDiff) (*felt.Felt, *BlockCommitments
}, nil

Check warning on line 248 in core/block.go

View check run for this annotation

Codecov / codecov/patch

core/block.go#L217-L248

Added lines #L217 - L248 were not covered by tests
}

func Post0132Hash(b *Block, stateDiff *StateDiff) (*felt.Felt, *BlockCommitments, error) {
func post0132Hash(b *Block, stateDiff *StateDiff) (*felt.Felt, *BlockCommitments, error) {
wg := conc.NewWaitGroup()
var txCommitment, eCommitment, rCommitment, sdCommitment *felt.Felt
var sdLength uint64
Expand Down

0 comments on commit cf5fc5d

Please sign in to comment.