computeStatePrivDB retrieves the private state database associated with a certain block.
(block *types.Block)
| 557 | |
| 558 | // computeStatePrivDB retrieves the private state database associated with a certain block. |
| 559 | func (api *PrivateDebugAPI) computeStatePrivDB(block *types.Block) (*state.StateDB, error) { |
| 560 | // If we have the state fully available, use that |
| 561 | privStatedb, err := api.cpc.blockchain.StatePrivAt(block.StateRoot()) |
| 562 | if err == nil { |
| 563 | return privStatedb, nil |
| 564 | } |
| 565 | // TODO: Otherwise try to reexec blocks until we find a state or reach our limit |
| 566 | panic(err) |
| 567 | } |
| 568 | |
| 569 | // TraceTransaction returns the structured logs created during the execution of EVM |
| 570 | // and returns them as a JSON object. |
no test coverage detected