Changeset - 9dbe43245cff
[Not reviewed]
default
0 1 0
Laman - 7 years ago 2017-10-19 11:56:59

fixed index bug on negotiating the last inner node
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
client.py
Show inline comments
 
@@ -36,7 +36,8 @@ while len(nodeStack)>0:
 
  assert jsonData["dataType"]=="hash"
 
  
 
  if localTree.store[i]!=binData:
 
    if 2*i+3<len(localTree.store): # inner node
 
    # ie. 0-6 nodes, 7-14 leaves. 2*6+2<15
 
    if 2*i+2<len(localTree.store): # inner node
 
      nodeStack.append(2*i+2)
 
      nodeStack.append(2*i+1)
 
    else: blocksToTransfer.append(i-localTree.leafStart) # leaf
0 comments (0 inline, 0 general)