mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-15 09:20:44 +00:00
parent
b18f9f2705
commit
958ad72b8e
1 changed files with 6 additions and 2 deletions
|
|
@ -268,11 +268,15 @@ func (s *Sync) Commit(dbw ethdb.Batch) error {
|
||||||
// Dump the membatch into a database dbw
|
// Dump the membatch into a database dbw
|
||||||
for key, value := range s.membatch.nodes {
|
for key, value := range s.membatch.nodes {
|
||||||
rawdb.WriteTrieNode(dbw, key, value)
|
rawdb.WriteTrieNode(dbw, key, value)
|
||||||
s.bloom.Add(key[:])
|
if s.bloom != nil {
|
||||||
|
s.bloom.Add(key[:])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for key, value := range s.membatch.codes {
|
for key, value := range s.membatch.codes {
|
||||||
rawdb.WriteCode(dbw, key, value)
|
rawdb.WriteCode(dbw, key, value)
|
||||||
s.bloom.Add(key[:])
|
if s.bloom != nil {
|
||||||
|
s.bloom.Add(key[:])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Drop the membatch data and return
|
// Drop the membatch data and return
|
||||||
s.membatch = newSyncMemBatch()
|
s.membatch = newSyncMemBatch()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue