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

Method State

core/blockchain.go:518–520  ·  view source on GitHub ↗

State returns a new mutable state(public) based on the current HEAD block.

()

Source from the content-addressed store, hash-verified

516
517// State returns a new mutable state(public) based on the current HEAD block.
518func (bc *BlockChain) State() (*state.StateDB, error) {
519 return bc.StateAt(bc.CurrentBlock().StateRoot())
520}
521
522// StatePriv returns a new mutable private state based on the current HEAD block.
523func (bc *BlockChain) StatePriv() (*state.StateDB, error) {

Callers 2

ExampleGenerateChainFunction · 0.95
RunMethod · 0.95

Calls 3

StateAtMethod · 0.95
CurrentBlockMethod · 0.95
StateRootMethod · 0.80

Tested by 1

ExampleGenerateChainFunction · 0.76