-
Notifications
You must be signed in to change notification settings - Fork 289
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
[Feature] RPC blocks support positive sequence #3824
Conversation
Benchmark for 1f0cd01Click to view benchmark
|
Codecov Report
@@ Coverage Diff @@
## master #3824 +/- ##
==========================================
+ Coverage 53.13% 53.20% +0.07%
==========================================
Files 595 595
Lines 64668 64700 +32
==========================================
+ Hits 34353 34415 +62
+ Misses 30315 30285 -30
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Benchmark for a6fb853Click to view benchmark
|
chain/api/src/chain.rs
Outdated
@@ -36,7 +36,12 @@ pub trait ChainReader { | |||
fn get_block_by_number(&self, number: BlockNumber) -> Result<Option<Block>>; | |||
/// Get latest `count` blocks before `number`. if `number` is absent, use head block number. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的相关注释也修改下吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
let blocks = mock_chain | ||
.head() | ||
.get_blocks_by_number(Some(9), false, u64::max_value())?; | ||
assert_eq!(blocks.len(), 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里需要加个Some(9), true, 3 类似这种测试用例吗
Benchmark for 8afdd8aClick to view benchmark
|
Benchmark for 2a5b85fClick to view benchmark
|
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: #3799