Skip to content

Commit

Permalink
test: fix pathdb unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
VM committed Sep 10, 2024
1 parent d49bfca commit 176b3f0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions triedb/pathdb/nodebufferlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,14 +460,12 @@ func (nf *nodebufferlist) flush(db ethdb.KeyValueStore, clean *fastcache.Cache,
return true
}

log.Info("24nf2nu2")
if !nf.isGenesis {
nf.traverseReverse(commitFunc)
} else {
log.Info("fme2iccmi2e")
nf.forceFlush()
}
log.Info("fm2o0923dfim")

persistID := nf.persistID + nf.base.layers
err := nf.base.flush(nf.db, nf.clean, persistID)
if err != nil {
Expand Down Expand Up @@ -664,18 +662,14 @@ func (nf *nodebufferlist) traverseReverse(cb func(*multiDifflayer) bool) {
return
}

// forceFlush is used for init genesis
func (nf *nodebufferlist) forceFlush() {
commitFunc := func(buffer *multiDifflayer) bool {
log.Info("rj238328")
log.Info("dm392d29m")
err := nf.base.commit(buffer.root, buffer.id, buffer.block, buffer.layers, buffer.nodes)
log.Info("dm329d23910")
log.Info("d23903d2i")
if err != nil {
log.Error("Failed to commit nodes to base node buffer", "error", err)
return false
}
log.Info("d3190120o")
return false
}
nf.traverse(commitFunc)
Expand Down

0 comments on commit 176b3f0

Please sign in to comment.