Skip to content

Commit

Permalink
Delete unused stuff from trie, removed debug print
Browse files Browse the repository at this point in the history
  • Loading branch information
diamondburned committed Aug 6, 2019
1 parent 6037cb2 commit 3b85cc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,10 @@ func (g *Graph) updateGraph(tx *Transaction) error {
if complete {
delete(g.incomplete, childID)

if g.indexer != nil {
g.indexer.Remove(hex.EncodeToString(tx.ID[:]))
}

if err := g.updateGraph(child); err != nil {
continue
}
Expand Down
2 changes: 0 additions & 2 deletions ledger.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ func (l *Ledger) Find(query string, max int) (results []string) {
fullQuery := append(bucketPrefix, prefix...)

l.Snapshot().IterateFrom(fullQuery, func(key, _ []byte) bool {
fmt.Printf("%x\n", key)

if !bytes.HasPrefix(key, fullQuery) {
return false
}
Expand Down

0 comments on commit 3b85cc2

Please sign in to comment.