diff options
author | rjl493456442 <garyrong0905@gmail.com> | 2017-08-21 08:47:15 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-08-22 23:35:17 +0800 |
commit | 28aea46ac08579f3ecd1c35620915b8e1bfcc8b0 (patch) | |
tree | a2d00f77c624c5c255af1d05873eb3c5b0f17591 /eth | |
parent | 2fd5ba6bd41380cf0e21d3ec0ca4bbc4aa7b6c34 (diff) | |
download | go-tangerine-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar go-tangerine-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.gz go-tangerine-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.bz2 go-tangerine-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.lz go-tangerine-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.xz go-tangerine-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.zst go-tangerine-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.zip |
core: implement Metropolis EIP 658, receipt status byte
Diffstat (limited to 'eth')
-rw-r--r-- | eth/api.go | 5 | ||||
-rw-r--r-- | eth/backend_test.go | 4 | ||||
-rw-r--r-- | eth/filters/filter_test.go | 10 |
3 files changed, 10 insertions, 9 deletions
diff --git a/eth/api.go b/eth/api.go index f5214fc37..9904c6f53 100644 --- a/eth/api.go +++ b/eth/api.go @@ -523,7 +523,8 @@ func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, txHash common. // Run the transaction with tracing enabled. vmenv := vm.NewEVM(context, statedb, api.config, vm.Config{Debug: true, Tracer: tracer}) - ret, gas, err := core.ApplyMessage(vmenv, msg, new(core.GasPool).AddGas(tx.Gas())) + // TODO utilize failed flag + ret, gas, _, err := core.ApplyMessage(vmenv, msg, new(core.GasPool).AddGas(tx.Gas())) if err != nil { return nil, fmt.Errorf("tracing failed: %v", err) } @@ -570,7 +571,7 @@ func (api *PrivateDebugAPI) computeTxEnv(blockHash common.Hash, txIndex int) (co vmenv := vm.NewEVM(context, statedb, api.config, vm.Config{}) gp := new(core.GasPool).AddGas(tx.Gas()) - _, _, err := core.ApplyMessage(vmenv, msg, gp) + _, _, _, err := core.ApplyMessage(vmenv, msg, gp) if err != nil { return nil, vm.Context{}, nil, fmt.Errorf("tx %x failed: %v", tx.Hash(), err) } diff --git a/eth/backend_test.go b/eth/backend_test.go index 4351b24cf..1fd25e95a 100644 --- a/eth/backend_test.go +++ b/eth/backend_test.go @@ -35,11 +35,11 @@ func TestMipmapUpgrade(t *testing.T) { chain, receipts := core.GenerateChain(params.TestChainConfig, genesis, db, 10, func(i int, gen *core.BlockGen) { switch i { case 1: - receipt := types.NewReceipt(nil, new(big.Int)) + receipt := types.NewReceipt(nil, false, new(big.Int)) receipt.Logs = []*types.Log{{Address: addr}} gen.AddUncheckedReceipt(receipt) case 2: - receipt := types.NewReceipt(nil, new(big.Int)) + receipt := types.NewReceipt(nil, false, new(big.Int)) receipt.Logs = []*types.Log{{Address: addr}} gen.AddUncheckedReceipt(receipt) } diff --git a/eth/filters/filter_test.go b/eth/filters/filter_test.go index 3244c04d7..cf508a218 100644 --- a/eth/filters/filter_test.go +++ b/eth/filters/filter_test.go @@ -33,7 +33,7 @@ import ( ) func makeReceipt(addr common.Address) *types.Receipt { - receipt := types.NewReceipt(nil, new(big.Int)) + receipt := types.NewReceipt(nil, false, new(big.Int)) receipt.Logs = []*types.Log{ {Address: addr}, } @@ -145,7 +145,7 @@ func TestFilters(t *testing.T) { var receipts types.Receipts switch i { case 1: - receipt := types.NewReceipt(nil, new(big.Int)) + receipt := types.NewReceipt(nil, false, new(big.Int)) receipt.Logs = []*types.Log{ { Address: addr, @@ -155,7 +155,7 @@ func TestFilters(t *testing.T) { gen.AddUncheckedReceipt(receipt) receipts = types.Receipts{receipt} case 2: - receipt := types.NewReceipt(nil, new(big.Int)) + receipt := types.NewReceipt(nil, false, new(big.Int)) receipt.Logs = []*types.Log{ { Address: addr, @@ -165,7 +165,7 @@ func TestFilters(t *testing.T) { gen.AddUncheckedReceipt(receipt) receipts = types.Receipts{receipt} case 998: - receipt := types.NewReceipt(nil, new(big.Int)) + receipt := types.NewReceipt(nil, false, new(big.Int)) receipt.Logs = []*types.Log{ { Address: addr, @@ -175,7 +175,7 @@ func TestFilters(t *testing.T) { gen.AddUncheckedReceipt(receipt) receipts = types.Receipts{receipt} case 999: - receipt := types.NewReceipt(nil, new(big.Int)) + receipt := types.NewReceipt(nil, false, new(big.Int)) receipt.Logs = []*types.Log{ { Address: addr, |