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

event StoreHeader can have a returnCode collision #34

Open
ethers opened this issue Mar 7, 2016 · 1 comment
Open

event StoreHeader can have a returnCode collision #34

ethers opened this issue Mar 7, 2016 · 1 comment

Comments

@ethers
Copy link
Member

ethers commented Mar 7, 2016

StoreHeader for the header for blockheight say 10010 will lead to ambiguty with ERR_DIFFICULTY https://github.com/ethereum/btcrelay/blob/develop/constants.se#L15

maybe error codes for storeBlockHeader should all be negative numbers.

@staccDOTsol
Copy link

Yes, you are correct. The event StoreHeader in Ethereum can potentially have a collision with the ERR_DIFFICULTY error code. This is because both the event and the error code are defined with the same name in the constants.se file of the btcrelay repository.

To avoid this ambiguity, one possible solution could be to use negative numbers for the error codes related to the storeBlockHeader function. By using negative numbers, you can differentiate them from the positive return codes of the StoreHeader event.

It's important to ensure that the error codes are clearly defined and documented to avoid any confusion or conflicts in the codebase.

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
@ethers @staccDOTsol and others