mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-10 14:03:46 +00:00
Remove Test_sizedDataTransaction
This commit is contained in:
parent
c817d28e0c
commit
edc2bca543
1 changed files with 0 additions and 18 deletions
|
|
@ -18,7 +18,6 @@ package legacypool
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/ecdsa"
|
"crypto/ecdsa"
|
||||||
"crypto/elliptic"
|
|
||||||
crand "crypto/rand"
|
crand "crypto/rand"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"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 {
|
func txSignatureLen(tx *types.Transaction) uint64 {
|
||||||
v, r, s := tx.RawSignatureValues()
|
v, r, s := tx.RawSignatureValues()
|
||||||
empty := &types.LegacyTx{}
|
empty := &types.LegacyTx{}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue