Remove Test_sizedDataTransaction

This commit is contained in:
Quentin Mc Gaw 2025-02-18 13:47:48 +01:00
parent c817d28e0c
commit edc2bca543
No known key found for this signature in database
GPG key ID: 6B26BAFFE648CAFB

View file

@ -18,7 +18,6 @@ package legacypool
import (
"crypto/ecdsa"
"crypto/elliptic"
crand "crypto/rand"
"errors"
"fmt"
@ -1299,23 +1298,6 @@ func sizedDataTransaction(targetSize, nonce, gasLimit uint64, key *ecdsa.Private
}
}
func Test_sizedDataTransaction(t *testing.T) {
t.Skip("skipping this test which takes about one minute to complete")
const minSize uint64 = 98
key, err := ecdsa.GenerateKey(elliptic.P256(), crand.Reader)
require.NoError(t, err)
for targetSize := minSize; targetSize < txMaxSize; targetSize++ {
const nonce = 1
const gasLimit = 100000
tx, err := sizedDataTransaction(targetSize, nonce, gasLimit, key)
if err != nil { // some sizes cannot be generated
t.Log(err)
continue
}
require.Equal(t, targetSize, tx.Size())
}
}
func txSignatureLen(tx *types.Transaction) uint64 {
v, r, s := tx.RawSignatureValues()
empty := &types.LegacyTx{}