Skip to content

Commit

Permalink
Prune: clarify method comment
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Jan 23, 2023
1 parent 899499f commit c6d77f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/blocktree/blocktree.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,9 @@ func (bt *BlockTree) getNode(h Hash) (ret *node) {
return nil
}

// Prune sets the given hash as the new blocktree root,
// removing all nodes that are not the new root node or its descendant
// Prune sets the node corresponding to the given `finalised` hash
// as the new blocktree root and removes all nodes that are not the
// new root node or its descendants.
// It returns a mapping of fork block hash origin to a slice of block hashes
// forming the corresponding forked chain.
func (bt *BlockTree) Prune(finalised Hash) (forkOriginToChain map[Hash][]Hash) {
Expand Down

0 comments on commit c6d77f0

Please sign in to comment.