Skip to content

Commit c8ef2f6

Browse files
committed
Enforce function types
1 parent 20f9e6f commit c8ef2f6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/ethkit/block.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func CheckLogs(block *types.Block, provider *ethrpc.Provider, ignoreZeroGasLogs
307307

308308
// zeroGasLogsFilter removes logs from transactions whose gas price is zero
309309
// (HyperEVM system transactions).
310-
func zeroGasLogsFilter(ls []types.Log, _ *types.Header, block *types.Block) []types.Log {
310+
var zeroGasLogsFilter ethutil.LogsFilterFunc = func(ls []types.Log, _ *types.Header, block *types.Block) []types.Log {
311311
gasPriceByTx := make(map[common.Hash]*big.Int, len(block.Transactions()))
312312
for _, tx := range block.Transactions() {
313313
gasPriceByTx[tx.Hash()] = tx.GasPrice()

ethutil/validate_logs_with_block.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type LogsFilterFunc func(logs []types.Log, header *types.Header, block *types.Bl
1616

1717
// ValidateLogsWithBlockHeader validates that the logs come from the given block
1818
// by comparing the calculated bloom against the header bloom.
19-
func ValidateLogsWithBlockHeader(logs []types.Log, header *types.Header) bool {
19+
var ValidateLogsWithBlockHeader LogsBloomCheckFunc = func(logs []types.Log, header *types.Header) bool {
2020
return bytes.Equal(ConvertLogsToBloom(logs).Bytes(), header.Bloom.Bytes())
2121
}
2222

0 commit comments

Comments
 (0)