Skip to content

Commit

Permalink
Resolved Hashes Function error
Browse files Browse the repository at this point in the history
  • Loading branch information
VeerChaurasia committed Sep 19, 2024
1 parent 064ae1d commit 7890329
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ func Default() *Transactions {
Full: []types.Transaction{},
}
}
func (t *Transactions) hashes() [][32]byte {
func (t *Transactions) HashesFunc() [][32]byte {
if len(t.Hashes) > 0 { //if Transactions struct contains hashes then return them directly
return t.Hashes
}
hashes := make([][32]byte, len(t.Full))
for i, tx := range t.Full {
hashes[i] = tx.Hash()
for i := range t.Full {
hashes[i] = t.Full[i].Hash()
}
return hashes
}
Expand Down

0 comments on commit 7890329

Please sign in to comment.