eth: utilize sync bloom for getNodeData (#21445)
* eth/downloader, eth/handler: utilize sync bloom for getNodeData * trie: handle if bloom is nil * trie, downloader: check bloom nilness externally
This commit is contained in:
committed by
GitHub
parent
1b5a867eec
commit
0f4e7c9b0d
@ -610,6 +610,10 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
|
||||
// Retrieve the requested state entry, stopping if enough was found
|
||||
// todo now the code and trienode is mixed in the protocol level,
|
||||
// separate these two types.
|
||||
if !pm.downloader.SyncBloomContains(hash[:]) {
|
||||
// Only lookup the trie node if there's chance that we actually have it
|
||||
continue
|
||||
}
|
||||
entry, err := pm.blockchain.TrieNode(hash)
|
||||
if len(entry) == 0 || err != nil {
|
||||
// Read the contract code with prefix only to save unnecessary lookups.
|
||||
|
Reference in New Issue
Block a user