HasState checks if state trie is fully present in the database or not.
(hash common.Hash)
| 692 | |
| 693 | // HasState checks if state trie is fully present in the database or not. |
| 694 | func (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. |
no test coverage detected