We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am deploying a contract on the dev chain using the go sdk, with Go code here.
But when I was trying to raise a transaction, it failed with a log
2020/05/13 17:52:03 send transaction error: OutPoint: Dead(OutPoint(0x120803ff0f9891c2278f26d605f4e67e1b462a1a3ebbf0444ed17e74198920f000000000)) exit status 1
Maybe I made this error by using CellCollector wrongly. How can I get all live cells correctly?
CellCollector
The text was updated successfully, but these errors were encountered:
It seems that this problem is caused by code here.
The JSON rpc get_cells_by_lock_hash returns live cells in block range [from, to], which means the cells in the block at height to are counted in.
get_cells_by_lock_hash
to
While the code below will count in some cells twice as the for loop goes.
for
func (c *CellCollector) collectFromBlocks(lockHash types.Hash) (*CollectResult, error) { // omitted snippets for { end := start + 100 // omitted snippets start += 100 } return &result, nil }
As for the solution, a slight change may work.
start += 100 // -> start += 101
Sorry, something went wrong.
@lostpg thanks, v0.2.2 already fixed this bug.
No branches or pull requests
I am deploying a contract on the dev chain using the go sdk, with Go code here.
But when I was trying to raise a transaction, it failed with a log
Maybe I made this error by using
CellCollector
wrongly. How can I get all live cells correctly?The text was updated successfully, but these errors were encountered: