Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于节点插入时bucket分裂问题 #47

Open
laulucky opened this issue Jul 31, 2018 · 1 comment
Open

关于节点插入时bucket分裂问题 #47

laulucky opened this issue Jul 31, 2018 · 1 comment

Comments

@laulucky
Copy link

laulucky commented Jul 31, 2018

} else if root.KBucket().prefix.Compare(nd.id, prefixLen-1) == 0 {

routingtable.go 388行,bucket分裂的条件判断,是否应该是当前叶子节点和本机节点的前缀相同时,才去分裂,而代码中的判断是新插入节点与当前叶子节点进行比较。
PS:看了下有个人提了同样的问题,你的回答是为了容纳更多的节点,但是这样的话,后面else加入candidate的逻辑是不是都走不到了

@raspher
Copy link

raspher commented Jul 16, 2021

English?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants