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
Network reconstruction #3900
Network reconstruction #3900
Conversation
|
||
impl BusinessLayerHandle for PeerInfo { | ||
fn handshake(&self, peer_info: &[u8]) -> Result<(), (&'static str, String)> { | ||
let other_chain_info = ChainInfo::decode(peer_info).unwrap(); |
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.
这些地方unwrap()失败是不是直接导致节点崩溃了?
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.
这个我后面改一改
Benchmark for 92afc23Click to view benchmark
|
Benchmark for b88260eClick to view benchmark
|
Codecov Report
@@ Coverage Diff @@
## master #3900 +/- ##
==========================================
+ Coverage 53.73% 53.89% +0.16%
==========================================
Files 618 619 +1
Lines 68014 68233 +219
==========================================
+ Hits 36539 36764 +225
+ Misses 31475 31469 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 23 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
cec8d55
to
66f54ea
Compare
2, resolve the compatibility issue
9754fa9
to
5c1b619
Compare
Benchmark for 0c8613fClick to view benchmark
|
network/src/service.rs
Outdated
self.network_service.update_business_status( | ||
ChainStatus::new(msg.compact_block.header.clone(), msg.block_info.clone()) | ||
.encode() | ||
.unwrap(), |
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.
这里ChainStatus::new变量是不是encode一定会成功?是的话这个unwrap()改成expect
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.
好的,我改一下
} | ||
|
||
impl BusinessLayerHandle for Networkp2pHandle { | ||
fn handshake( |
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.
建议此处只对 status 进行处理,根据其返回状态来处理 notifications_sink和 CustomMessageOutcome,这两个在network这层不关心,放到 network-p2p里面比较合理。
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.
已修改,我重新测试一下,跑main和Barnard 1-2天的时间
Benchmark for bf074b5Click to view benchmark
|
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Other information