-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Description
func (p *prefixTrie) insert(network rnet.Network, entry RangerEntry) (bool, error) {
* * *
// No existing child, insert new leaf trie.
if existingChild == nil || existingChild.network.Number == nil {
* * *
}
* * *
// Check whether it is necessary to insert additional path prefix between current trie and existing child,
// in the case that inserted network diverges on its path to existing child.
if lcb, err := network.LeastCommonBitPosition(existingChild.network); err == nil {
* * *
} else {
return false, err
}
return existingChild.insert(network, entry)
}
Metadata
Metadata
Assignees
Labels
No labels