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

Method HasState

core/blockchain.go:694–697  ·  view source on GitHub ↗

HasState checks if state trie is fully present in the database or not.

(hash common.Hash)

Source from the content-addressed store, hash-verified

692
693// HasState checks if state trie is fully present in the database or not.
694func (bc *BlockChain) HasState(hash common.Hash) bool {
695 _, err := bc.stateCache.OpenTrie(hash)
696 return err == nil
697}
698
699// HasBlockAndState checks if a block and associated state trie is fully present
700// in the database or not, caching it if present.

Callers 2

HasBlockAndStateMethod · 0.95
insertChainMethod · 0.95

Calls 1

OpenTrieMethod · 0.65

Tested by

no test coverage detected