remove 0xef0001 || accounts[0].addr unit test

This commit is contained in:
colinlyguo 2025-04-10 00:38:40 +08:00
parent 1d5cae80d0
commit d82bb03d98
No known key found for this signature in database
GPG key ID: 82E123BE1B68288B
2 changed files with 0 additions and 16 deletions

View file

@ -81,11 +81,6 @@ type ErrInvalidOpCode struct {
func (e *ErrInvalidOpCode) Error() string { return fmt.Sprintf("invalid opcode: %s", e.opcode) } func (e *ErrInvalidOpCode) Error() string { return fmt.Sprintf("invalid opcode: %s", e.opcode) }
// NewErrInvalidOpCode is only used in tests to generate an exact ErrInvalidOpCode error.
func NewErrInvalidOpCode(opcode OpCode) *ErrInvalidOpCode {
return &ErrInvalidOpCode{opcode: opcode}
}
// rpcError is the same interface as the one defined in rpc/errors.go // rpcError is the same interface as the one defined in rpc/errors.go
// but we do not want to depend on rpc package here so we redefine it. // but we do not want to depend on rpc package here so we redefine it.
// //

View file

@ -850,17 +850,6 @@ func TestEstimateGas(t *testing.T) {
}, },
want: 46000, want: 46000,
}, },
// Should retrieve the code of 0xef0001 || accounts[0].addr and return an invalid opcode error.
{
blockNumber: rpc.LatestBlockNumber,
call: TransactionArgs{
From: &accounts[0].addr,
To: &accounts[0].addr,
Value: (*hexutil.Big)(big.NewInt(0)),
AuthorizationList: []types.SetCodeAuthorization{setCodeAuthorization},
},
expectErr: vm.NewErrInvalidOpCode(0xef),
},
// SetCodeTx with empty authorization list should fail. // SetCodeTx with empty authorization list should fail.
{ {
blockNumber: rpc.LatestBlockNumber, blockNumber: rpc.LatestBlockNumber,