-
Notifications
You must be signed in to change notification settings - Fork 236
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
Modify the method Relayer::accept_block
to return StatusCode::BlockIsInvalid
when shared.insert_new_block()
produces an error.
#4333
Merged
zhangsoledad
merged 7 commits into
nervosnetwork:develop
from
eval-exec:exec/relayer-handle-accept_block_error
Feb 1, 2024
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TODO:
FAIL [ 0.631s] ckb-sync relayer::tests::compact_block_process::test_accept_block
--- STDOUT: ckb-sync relayer::tests::compact_block_process::test_accept_block ---
running 1 test
test relayer::tests::compact_block_process::test_accept_block ... FAILED
failures:
failures:
relayer::tests::compact_block_process::test_accept_block
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 69 filtered out; finished in 0.61s
--- STDERR: ckb-sync relayer::tests::compact_block_process::test_accept_block ---
thread 'relayer::tests::compact_block_process::test_accept_block' panicked at 'assertion failed: `(left == right)`
left: `Status { code: BlockIsInvalid, context: Some("Byte32(0x7128196a2d588fa711b44cf2076ca26e1ee9be06060e67c5b260e5785a47615e), error: Block(Cellbase(InvalidQuantity))") }`,
right: `Status { code: OK, context: None }`', sync/src/relayer/tests/compact_block_process.rs:392:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
FAIL [ 0.661s] ckb-sync relayer::tests::compact_block_process::test_accept_not_a_better_block
--- STDOUT: ckb-sync relayer::tests::compact_block_process::test_accept_not_a_better_block ---
running 1 test
test relayer::tests::compact_block_process::test_accept_not_a_better_block ... FAILED
failures:
failures:
relayer::tests::compact_block_process::test_accept_not_a_better_block
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 69 filtered out; finished in 0.64s
--- STDERR: ckb-sync relayer::tests::compact_block_process::test_accept_not_a_better_block ---
thread 'relayer::tests::compact_block_process::test_accept_not_a_better_block' panicked at 'assertion failed: `(left == right)`
left: `Status { code: BlockIsInvalid, context: Some("Byte32(0xd0176ece8f840c998f24aacdfcdccd29dca4a9a65d1f7cc860c09415853bbb7e), error: Block(Cellbase(InvalidQuantity))") }`,
right: `Status { code: OK, context: None }`', sync/src/relayer/tests/compact_block_process.rs:185:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
The issue with the unit test |
eval-exec
force-pushed
the
exec/relayer-handle-accept_block_error
branch
from
January 31, 2024 13:13
a4d4db4
to
740f2f3
Compare
quake
approved these changes
Feb 1, 2024
zhangsoledad
approved these changes
Feb 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Let
Relayer::accept_block
returnStatus
Check List
Tests
Side effects
Release note