Skip to content

__buildTree() requires 3 arguments but called with 1 #1

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

Open
upperdim opened this issue Dec 26, 2021 · 3 comments
Open

__buildTree() requires 3 arguments but called with 1 #1

upperdim opened this issue Dec 26, 2021 · 3 comments

Comments

@upperdim
Copy link

error with the driver code

tree = merkleTree()
data = [1, 2, 3, 4]
tree.makeTreeFromArray(data)
@retajmh99
Copy link

error with the driver code

tree = merkleTree()
data = [1, 2, 3, 4]
tree.makeTreeFromArray(data)

can you please tell me how to solve the problem and were to put these lines ?

@retajmh99
Copy link

@andipro123 can you please check this issue !

@WhiteKIM
Copy link

try this code

in makeTreeFromArray

    nodesReqd = __noOfNodesReqd(arr)
    nodeArr = [num for num in range(1,nodesReqd+1)]
    self.root = __buildTree(nodeArr, self.root, 0, nodesReqd)
    __addLeafData(arr,self.root)

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

3 participants