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

refactor: Improve error when submitting block #2168

Merged
merged 2 commits into from Aug 6, 2020
Merged

refactor: Improve error when submitting block #2168

merged 2 commits into from Aug 6, 2020

Conversation

doitian
Copy link
Member

@doitian doitian commented Jul 15, 2020

Include more info in the error messages:

  • Add expected version and actual value in header version error.

Add logs to ease debugging PoW. It can be enabled by setting the log level:

[logger]
filter = "info,ckb-pow=debug"

@doitian doitian requested a review from a team July 15, 2020 09:43
zhangsoledad
zhangsoledad previously approved these changes Jul 15, 2020
@doitian doitian added this to 👀 Awaiting review in CKB - Pull Requests Jul 20, 2020
@doitian
Copy link
Member Author

doitian commented Jul 22, 2020

Rebased to resolve conflicts in verification/src/error.rs

quake
quake previously approved these changes Jul 31, 2020
CKB - Pull Requests automation moved this from 👀 Awaiting review to ✅ Reviewer approved Jul 31, 2020
@quake
Copy link
Member

quake commented Jul 31, 2020

bors r=quake,yangby-cryptape

bors bot added a commit that referenced this pull request Jul 31, 2020
2168: refactor: Improve error when submitting block r=quake,yangby-cryptape a=doitian

Include more info in the error messages:

* Add expected version and actual value in header version error.

Add logs to ease debugging PoW. It can be enabled by setting the log level:

```
[logger]
filter = "info,ckb-pow=debug"
```

Co-authored-by: ian <ian@nervos.org>
@bors
Copy link
Contributor

bors bot commented Jul 31, 2020

Build failed:

Cargo.lock Outdated Show resolved Hide resolved
CKB - Pull Requests automation moved this from ✅ Reviewer approved to 👀 Awaiting review Jul 31, 2020
Add expected version and the actual value in the error message.
The log can be enabled by setting the log level of target "ckb-pow" to
debug.

Example

```
[logger]
filter = "info,ckb-pow=debug"
```

The error message of the error `PowError::InvalidNonce` is also changed to include
a hint:

```
InvalidNonce: please set logger.filter to "info,ckb-pow=debug" to see detailed PoW verification information in the log"
```
@doitian
Copy link
Member Author

doitian commented Aug 5, 2020

Resolved the Cargo.lock conflict

CKB - Pull Requests automation moved this from 👀 Awaiting review to ✅ Reviewer approved Aug 6, 2020
@doitian
Copy link
Member Author

doitian commented Aug 6, 2020

bors r=quake,keroro520,yangby-cryptape

@bors
Copy link
Contributor

bors bot commented Aug 6, 2020

Build succeeded:

@bors bors bot merged commit 9532f91 into nervosnetwork:develop Aug 6, 2020
CKB - Pull Requests automation moved this from ✅ Reviewer approved to Done Aug 6, 2020
@doitian doitian deleted the better-submit-block-error branch September 11, 2020 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants