mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
fix: unittest
This commit is contained in:
parent
4bd95bc495
commit
d259e19f05
1 changed files with 3 additions and 1 deletions
|
|
@ -69,6 +69,8 @@ func newBlobTx(sim *Backend, key *ecdsa.PrivateKey, nonce uint64) (*types.Transa
|
||||||
chainid, _ := client.ChainID(context.Background())
|
chainid, _ := client.ChainID(context.Background())
|
||||||
chainidU256, _ := uint256.FromBig(chainid)
|
chainidU256, _ := uint256.FromBig(chainid)
|
||||||
|
|
||||||
|
sidecar := types.NewBlobTxSidecar(types.BlobSidecarVersion0, []kzg4844.Blob{*testBlob}, []kzg4844.Commitment{testBlobCommit}, []kzg4844.Proof{testBlobProof})
|
||||||
|
sidecar.ToV1()
|
||||||
tx := types.NewTx(&types.BlobTx{
|
tx := types.NewTx(&types.BlobTx{
|
||||||
ChainID: chainidU256,
|
ChainID: chainidU256,
|
||||||
GasTipCap: gasTipCapU256,
|
GasTipCap: gasTipCapU256,
|
||||||
|
|
@ -79,7 +81,7 @@ func newBlobTx(sim *Backend, key *ecdsa.PrivateKey, nonce uint64) (*types.Transa
|
||||||
To: addr,
|
To: addr,
|
||||||
AccessList: nil,
|
AccessList: nil,
|
||||||
BlobHashes: []common.Hash{testBlobVHash},
|
BlobHashes: []common.Hash{testBlobVHash},
|
||||||
Sidecar: types.NewBlobTxSidecar(types.BlobSidecarVersion0, []kzg4844.Blob{*testBlob}, []kzg4844.Commitment{testBlobCommit}, []kzg4844.Proof{testBlobProof}),
|
Sidecar: sidecar,
|
||||||
})
|
})
|
||||||
return types.SignTx(tx, types.LatestSignerForChainID(chainid), key)
|
return types.SignTx(tx, types.LatestSignerForChainID(chainid), key)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue