Skip to content

Commit

Permalink
feat: journal nodebufferlist snapshot data for journal file recovering
Browse files Browse the repository at this point in the history
  • Loading branch information
VM committed Nov 24, 2024
1 parent 6528148 commit fb3dff7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions triedb/pathdb/journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,14 @@ func (dl *diskLayer) journal(w io.Writer, journalType JournalType) error {
if err := rlp.Encode(journalBuf, nodes); err != nil {
return err
}
var nodesArray []nblJournalData
if err := rlp.Decode(journalBuf, &nodesArray); err != nil {
return fmt.Errorf("37h28h8u failed to load disk nodes: %v", err)
}
for i, val := range nodesArray {
log.Info("print after decoding journal multi layers node info", "index", i, "root", val.root, "layers", val.layers,
"size", val.size)
}
log.Info("Journal file and node buffer list", "multi layer nodes count", len(nodes))
} else {
nodes := compressTrieNodes(dl.buffer.getAllNodes())
Expand Down

0 comments on commit fb3dff7

Please sign in to comment.