mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(p2p): refactor downloaders and add peer id to the result (#410)
* feat(p2p): refactor downloaders and add peer id to the result * rm unused import * fix tests * clean up deps * Update crates/interfaces/src/p2p/error.rs Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * add split fn Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -67,7 +67,7 @@ async fn test_get_body() {
|
||||
let res = fetch0.get_block_body(vec![block_hash]).await;
|
||||
assert!(res.is_ok());
|
||||
|
||||
let blocks = res.unwrap();
|
||||
let blocks = res.unwrap().1;
|
||||
assert_eq!(blocks.len(), 1);
|
||||
let expected = BlockBody { transactions: block.body, ommers: block.ommers };
|
||||
assert_eq!(blocks[0], expected);
|
||||
@ -114,7 +114,7 @@ async fn test_get_header() {
|
||||
let res = fetch0.get_headers(req).await;
|
||||
assert!(res.is_ok());
|
||||
|
||||
let headers = res.unwrap().0;
|
||||
let headers = res.unwrap().1 .0;
|
||||
assert_eq!(headers.len(), 1);
|
||||
assert_eq!(headers[0], header);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user