core/types, params: EIP#155
This commit is contained in:
12
eth/api.go
12
eth/api.go
@ -506,21 +506,15 @@ func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, txHash common.
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
signer := types.MakeSigner(api.config, block.Number())
|
||||
// Mutate the state and trace the selected transaction
|
||||
for idx, tx := range block.Transactions() {
|
||||
// Assemble the transaction call message
|
||||
from, err := tx.FromFrontier()
|
||||
msg, err := tx.AsMessage(signer)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("sender retrieval failed: %v", err)
|
||||
}
|
||||
msg := callmsg{
|
||||
addr: from,
|
||||
to: tx.To(),
|
||||
gas: tx.Gas(),
|
||||
gasPrice: tx.GasPrice(),
|
||||
value: tx.Value(),
|
||||
data: tx.Data(),
|
||||
}
|
||||
// Mutate the state if we haven't reached the tracing transaction yet
|
||||
if uint64(idx) < txIndex {
|
||||
vmenv := core.NewEnv(stateDb, api.config, api.eth.BlockChain(), msg, block.Header(), vm.Config{})
|
||||
|
Reference in New Issue
Block a user