Skip to content

Commit

Permalink
Add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
yzang2019 committed Oct 4, 2023
1 parent aaf2bb6 commit 3b16722
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func (ndb *nodeDB) extractStateChanges(prevVersion int64, prevRoot []byte, root
if err != nil {
return err
}
fmt.Printf("prevIter \n")

var (
// current shared node between two versions
Expand Down Expand Up @@ -65,13 +64,12 @@ func (ndb *nodeDB) extractStateChanges(prevVersion int64, prevRoot []byte, root
if err := consumeNewLeaves(); err != nil {
return err
}
fmt.Printf("after consumeNewLeaves\n")

sharedNode = nil
for curIter.Valid() {
node := curIter.GetNode()
fmt.Printf("curIter is valid %d\n", node.version)
shared := node.version <= prevVersion
fmt.Printf("curIter is valid with version %d and prevVersion %d\n", node.version, prevVersion)
curIter.Next(shared)
if shared {
sharedNode = node
Expand Down
2 changes: 1 addition & 1 deletion nodedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ func (ndb *nodeDB) traverseStateChanges(startVersion, endVersion int64, fn func(
if err != nil {
return err
}
fmt.Printf("Traversing range from %d to %d\n", startVersion, endVersion)
fmt.Printf("Traversing range from %d to %d with predecessor %d\n", startVersion, endVersion, predecessor)
return ndb.traverseRange(rootKeyFormat.Key(startVersion), rootKeyFormat.Key(endVersion), func(k, hash []byte) error {
var version int64
rootKeyFormat.Scan(k, &version)
Expand Down

0 comments on commit 3b16722

Please sign in to comment.