Skip to content

Commit 864e717

Browse files
authored
core: remove unused function parameters (ethereum#31001)
1 parent fcf5204 commit 864e717

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

core/blockchain_test.go

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2535,7 +2535,7 @@ func testReorgToShorterRemovesCanonMappingHeaderChain(t *testing.T, scheme strin
25352535
}
25362536

25372537
// Benchmarks large blocks with value transfers to non-existing accounts
2538-
func benchmarkLargeNumberOfValueToNonexisting(b *testing.B, numTxs, numBlocks int, recipientFn func(uint64) common.Address, dataFn func(uint64) []byte) {
2538+
func benchmarkLargeNumberOfValueToNonexisting(b *testing.B, numTxs, numBlocks int, recipientFn func(uint64) common.Address) {
25392539
var (
25402540
signer = types.HomesteadSigner{}
25412541
testBankKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
@@ -2598,10 +2598,7 @@ func BenchmarkBlockChain_1x1000ValueTransferToNonexisting(b *testing.B) {
25982598
recipientFn := func(nonce uint64) common.Address {
25992599
return common.BigToAddress(new(big.Int).SetUint64(1337 + nonce))
26002600
}
2601-
dataFn := func(nonce uint64) []byte {
2602-
return nil
2603-
}
2604-
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn, dataFn)
2601+
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn)
26052602
}
26062603

26072604
func BenchmarkBlockChain_1x1000ValueTransferToExisting(b *testing.B) {
@@ -2615,10 +2612,7 @@ func BenchmarkBlockChain_1x1000ValueTransferToExisting(b *testing.B) {
26152612
recipientFn := func(nonce uint64) common.Address {
26162613
return common.BigToAddress(new(big.Int).SetUint64(1337))
26172614
}
2618-
dataFn := func(nonce uint64) []byte {
2619-
return nil
2620-
}
2621-
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn, dataFn)
2615+
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn)
26222616
}
26232617

26242618
func BenchmarkBlockChain_1x1000Executions(b *testing.B) {
@@ -2632,10 +2626,7 @@ func BenchmarkBlockChain_1x1000Executions(b *testing.B) {
26322626
recipientFn := func(nonce uint64) common.Address {
26332627
return common.BigToAddress(new(big.Int).SetUint64(0xc0de))
26342628
}
2635-
dataFn := func(nonce uint64) []byte {
2636-
return nil
2637-
}
2638-
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn, dataFn)
2629+
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn)
26392630
}
26402631

26412632
// Tests that importing a some old blocks, where all blocks are before the

core/state_transition.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
470470
if msg.SetCodeAuthorizations != nil {
471471
for _, auth := range msg.SetCodeAuthorizations {
472472
// Note errors are ignored, we simply skip invalid authorizations here.
473-
st.applyAuthorization(msg, &auth)
473+
st.applyAuthorization(&auth)
474474
}
475475
}
476476

@@ -559,7 +559,7 @@ func (st *stateTransition) validateAuthorization(auth *types.SetCodeAuthorizatio
559559
}
560560

561561
// applyAuthorization applies an EIP-7702 code delegation to the state.
562-
func (st *stateTransition) applyAuthorization(msg *Message, auth *types.SetCodeAuthorization) error {
562+
func (st *stateTransition) applyAuthorization(auth *types.SetCodeAuthorization) error {
563563
authority, err := st.validateAuthorization(auth)
564564
if err != nil {
565565
return err

0 commit comments

Comments
 (0)