eth: fixed formatting

applied gofmt -s
This commit is contained in:
manicprogrammer 2017-11-30 12:43:53 -05:00
parent d9750af79e
commit ba880a7c04
4 changed files with 26 additions and 6 deletions

22
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,22 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "debug",
"remotePath": "",
"port": 2345,
"host": "127.0.0.1",
"program": "${fileDirname}",
"env": {},
"args": ["attach","--exec=debug.traceTransaction('0xb44ab4e708611c6cd2125bdedc013e922e876a6e1d45750541f258b14ae57c48')"],
//"args": ["--rinkeby","--datadir=j:\\rinkeby","--verbosity=0","console"],
"showLog": true
}
]
}

BIN
cmd/geth/debug Normal file

Binary file not shown.

View file

@ -452,12 +452,12 @@ func (api *PrivateDebugAPI) traceBlock(block *types.Block, logConfig *vm.LogConf
}
statedb, err := blockchain.StateAt(blockchain.GetBlock(block.ParentHash(), block.NumberU64()-1).Root())
if err != nil {
switch err.(type) {
switch err.(type) {
case *trie.MissingNodeError:
return false, structLogger.StructLogs(), fmt.Errorf("required historical state unavailable")
default:
return false, structLogger.StructLogs(), err
}
}
}
receipts, _, usedGas, err := processor.Process(block, statedb, config)
@ -503,7 +503,6 @@ func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, txHash common.
return nil, err
}
// Handle timeouts and RPC cancellations
deadlineCtx, cancel := context.WithTimeout(ctx, timeout)
go func() {
@ -524,15 +523,14 @@ func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, txHash common.
}
msg, context, statedb, err := api.computeTxEnv(blockHash, int(txIndex))
if err != nil {
switch err.(type) {
switch err.(type) {
case *trie.MissingNodeError:
return nil, fmt.Errorf("required historical state unavailable")
default:
return nil, err
}
}
}
// Run the transaction with tracing enabled.
vmenv := vm.NewEVM(context, statedb, api.config, vm.Config{Debug: true, Tracer: tracer})
ret, gas, failed, err := core.ApplyMessage(vmenv, msg, new(core.GasPool).AddGas(tx.Gas()))

BIN
geth.exe Normal file

Binary file not shown.