MCPcopy Create free account
hub / github.com/CPChain/chain / computeStatePrivDB

Method computeStatePrivDB

protocols/cpc/api_tracer.go:559–567  ·  view source on GitHub ↗

computeStatePrivDB retrieves the private state database associated with a certain block.

(block *types.Block)

Source from the content-addressed store, hash-verified

557
558// computeStatePrivDB retrieves the private state database associated with a certain block.
559func (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.

Callers 1

computeTxEnvMethod · 0.95

Calls 2

StatePrivAtMethod · 0.80
StateRootMethod · 0.80

Tested by

no test coverage detected