mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
getBlockReceipts test blob tx
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
91b91ad8c6
commit
9f50438db7
1 changed files with 25 additions and 0 deletions
|
|
@ -1838,6 +1838,7 @@ func setupReceiptBackend(t *testing.T, genBlocks int) (*testBackend, []common.Ha
|
||||||
}}
|
}}
|
||||||
tx, err = types.SignTx(types.NewTx(&types.AccessListTx{Nonce: uint64(i), To: nil, Gas: 58100, GasPrice: b.BaseFee(), Data: common.FromHex("0x60806040"), AccessList: accessList}), signer, acc1Key)
|
tx, err = types.SignTx(types.NewTx(&types.AccessListTx{Nonce: uint64(i), To: nil, Gas: 58100, GasPrice: b.BaseFee(), Data: common.FromHex("0x60806040"), AccessList: accessList}), signer, acc1Key)
|
||||||
case 5:
|
case 5:
|
||||||
|
// blob tx
|
||||||
fee := big.NewInt(500)
|
fee := big.NewInt(500)
|
||||||
fee.Add(fee, b.BaseFee())
|
fee.Add(fee, b.BaseFee())
|
||||||
tx, err = types.SignTx(types.NewTx(&types.BlobTx{
|
tx, err = types.SignTx(types.NewTx(&types.BlobTx{
|
||||||
|
|
@ -2229,6 +2230,30 @@ func TestRPCGetBlockReceipts(t *testing.T) {
|
||||||
test: rpc.BlockNumberOrHashWithNumber(rpc.BlockNumber(genBlocks + 1)),
|
test: rpc.BlockNumberOrHashWithNumber(rpc.BlockNumber(genBlocks + 1)),
|
||||||
want: `null`,
|
want: `null`,
|
||||||
},
|
},
|
||||||
|
// 11. block with blobl tx
|
||||||
|
{
|
||||||
|
test: rpc.BlockNumberOrHashWithNumber(rpc.BlockNumber(6)),
|
||||||
|
want: `[
|
||||||
|
{
|
||||||
|
"blobGasPrice": "0x1",
|
||||||
|
"blobGasUsed": "0x20000",
|
||||||
|
"blockHash": "0x2ffcbc982ea819900e22b96c72bc85c8c64e080b9479d1c68ee49f55564816e7",
|
||||||
|
"blockNumber": "0x6",
|
||||||
|
"contractAddress": null,
|
||||||
|
"cumulativeGasUsed": "0x5208",
|
||||||
|
"effectiveGasPrice": "0x1b09d63b",
|
||||||
|
"from": "0x703c4b2bd70c169f5717101caee543299fc946c7",
|
||||||
|
"gasUsed": "0x5208",
|
||||||
|
"logs": [],
|
||||||
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
"status": "0x1",
|
||||||
|
"to": "0x0d3ab14bbad3d99f4203bd7a11acb94882050e7e",
|
||||||
|
"transactionHash": "0xb51ee3d2a89ba5d5623c73133c8d7a6ba9fb41194c17f4302c21b30994a1180f",
|
||||||
|
"transactionIndex": "0x0",
|
||||||
|
"type": "0x3"
|
||||||
|
}
|
||||||
|
]`,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, tt := range testSuite {
|
for i, tt := range testSuite {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue