Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

Got exception when executing example code #102

Open
reverde opened this issue Mar 1, 2019 · 1 comment
Open

Got exception when executing example code #102

reverde opened this issue Mar 1, 2019 · 1 comment

Comments

@reverde
Copy link

reverde commented Mar 1, 2019

Hi, I got exception when I run the example code in readme

>>> operator.submit_block()
>>> userA.send_transaction(1, 1693390459388381052156419331572168595237271043726428428352746834777341368960, 10, '0x08d92dca9038ea9433254996a2d4f08d43be8227')
>>> operator.submit_block()
>>> userB.start_exit(1693390459388381052156419331572168595237271043726428428352746834777341368960, 1, 2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/plasma-cash/plasma_cash/client/client.py", line 72, in start_exit
    tx_proof = block.merkle.create_merkle_proof(uid)
  File "/plasma-cash/plasma_cash/utils/merkle/sparse_merkle_tree.py", line 64, in create_merkle_proof
    if sibling_index in self.tree[level]:
IndexError: list index out of range
>>> 

I use python3, ubuntu 18.04.1

Thanks.

@reverde
Copy link
Author

reverde commented Mar 4, 2019

Seems the index is wrong. And it should be

userB.start_exit(1693390459388381052156419331572168595237271043726428428352746834777341368960, 1, 3)

or you should delete operator.submit_block() before call the send_transaction() function

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

No branches or pull requests

1 participant