mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core/types, crypto/kzg4844: update tests
This commit is contained in:
parent
779c8b628c
commit
1102b4636a
2 changed files with 4 additions and 4 deletions
|
|
@ -59,7 +59,7 @@ func TestBlobTxSize(t *testing.T) {
|
|||
}
|
||||
|
||||
var (
|
||||
emptyBlob = kzg4844.Blob{}
|
||||
emptyBlob = new(kzg4844.Blob)
|
||||
emptyBlobCommit, _ = kzg4844.BlobToCommitment(emptyBlob)
|
||||
emptyBlobProof, _ = kzg4844.ComputeBlobProof(emptyBlob, emptyBlobCommit)
|
||||
)
|
||||
|
|
@ -72,7 +72,7 @@ func createEmptyBlobTx(key *ecdsa.PrivateKey, withSidecar bool) *Transaction {
|
|||
|
||||
func createEmptyBlobTxInner(withSidecar bool) *BlobTx {
|
||||
sidecar := &BlobTxSidecar{
|
||||
Blobs: []kzg4844.Blob{emptyBlob},
|
||||
Blobs: []kzg4844.Blob{*emptyBlob},
|
||||
Commitments: []kzg4844.Commitment{emptyBlobCommit},
|
||||
Proofs: []kzg4844.Proof{emptyBlobProof},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@ func randFieldElement() [32]byte {
|
|||
return gokzg4844.SerializeScalar(r)
|
||||
}
|
||||
|
||||
func randBlob() Blob {
|
||||
func randBlob() *Blob {
|
||||
var blob Blob
|
||||
for i := 0; i < len(blob); i += gokzg4844.SerializedScalarSize {
|
||||
fieldElementBytes := randFieldElement()
|
||||
copy(blob[i:i+gokzg4844.SerializedScalarSize], fieldElementBytes[:])
|
||||
}
|
||||
return blob
|
||||
return &blob
|
||||
}
|
||||
|
||||
func TestCKZGWithPoint(t *testing.T) { testKZGWithPoint(t, true) }
|
||||
|
|
|
|||
Loading…
Reference in a new issue