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

Add log emission tests #87

Merged
merged 2 commits into from
May 14, 2018
Merged

Conversation

NIC619
Copy link
Collaborator

@NIC619 NIC619 commented May 12, 2018

What was wrong?

Add tests to make sure event logs are/fail to emitted as expected.

Cute Animal Picture

put a cute animal picture link inside the parentheses

@NIC619 NIC619 requested review from mhchia and hwwhww May 12, 2018 15:41
mine(web3, 1)
# Check that log was successfully emitted
tx_receipt = web3.eth.getTransactionReceipt(tx_hash)
log = smc_handler.events.RegisterNotary().processReceipt(tx_receipt)[0]['args']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking if we need some APIs for those special logs (AddHeader, SubmitVote, RegisterNotary, DeregisterNotary, ReleaseNotary ...) in SMCHandler. What do you think of that?

Copy link
Collaborator Author

@NIC619 NIC619 May 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I was thinking adding these AIPs in ShardTracker.
shard_id in these events will be indexed so the logs emitted will become searchable(search by shard_id) and so clients using ShardTracker will get exactly the logs they care.

@NIC619 NIC619 merged commit cb8f5b5 into ethereum:develop May 14, 2018
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

Successfully merging this pull request may close these issues.

2 participants