diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index d39a0efd..5285c14c 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -223,6 +223,10 @@ first_pass_new(struct trie_node *node, slab *trie_slab) return; } + /* Root node */ + if (node->parent == NULL) + assert(node->bucket != NULL); + if (node->bucket == NULL) node->bucket = node->parent->bucket; @@ -496,6 +500,9 @@ second_pass(struct trie_node *node) return; } + /* Internal node */ + assert(node->potential_buckets_count == 0); + struct trie_node * const left = node->child[0]; struct trie_node * const right = node->child[1];