Skip to content

Commit 5e378e9

Browse files
committed
refactor: change TransactionsHash function to accept a pointer to types.Block since it has atomic values
1 parent 76363cc commit 5e378e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/ethkit/block.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func NewHeader(b *types.Block) *Header {
172172
WithdrawalsHash: b.Header().WithdrawalsHash,
173173
Size: b.Header().Size(),
174174
// TotalDifficulty: b.Difficulty(),
175-
TransactionsHash: TransactionsHash(*b),
175+
TransactionsHash: TransactionsHash(b),
176176
}
177177
}
178178

@@ -188,7 +188,7 @@ func (h *Header) String() string {
188188
}
189189

190190
// TransactionsHash returns a list of transaction hash starting from a list of transactions contained in a block.
191-
func TransactionsHash(block types.Block) []common.Hash {
191+
func TransactionsHash(block *types.Block) []common.Hash {
192192
txsh := make([]common.Hash, len(block.Transactions()))
193193

194194
for i, tx := range block.Transactions() {

0 commit comments

Comments
 (0)