mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 02:12:33 +00:00
Use SSZ types in rpc (#1244)
* Update `milagro_bls` to new release (#1183) * Update milagro_bls to new release Signed-off-by: Kirk Baird <baird.k@outlook.com> * Tidy up fake cryptos Signed-off-by: Kirk Baird <baird.k@outlook.com> * move SecretHash to bls and put plaintext back Signed-off-by: Kirk Baird <baird.k@outlook.com> * Update v0.12.0 to v0.12.1 * Use ssz types for Request and error types * Fix errors * Constrain BlocksByRangeRequest count to MAX_REQUEST_BLOCKS * Fix issues after rebasing * Address review comments Co-authored-by: Kirk Baird <baird.k@outlook.com> Co-authored-by: Michael Sproul <michael@sigmaprime.io> Co-authored-by: Age Manning <Age@AgeManning.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
use eth2_libp2p::rpc::methods::*;
|
||||
use eth2_libp2p::{BehaviourEvent, Libp2pEvent, Request, Response};
|
||||
use slog::{debug, warn, Level};
|
||||
use ssz_types::VariableList;
|
||||
use std::time::Duration;
|
||||
use tokio::time::delay_for;
|
||||
use types::{
|
||||
@@ -467,11 +468,11 @@ async fn test_blocks_by_root_chunked_rpc() {
|
||||
|
||||
// BlocksByRoot Request
|
||||
let rpc_request = Request::BlocksByRoot(BlocksByRootRequest {
|
||||
block_roots: vec![
|
||||
block_roots: VariableList::from(vec![
|
||||
Hash256::from_low_u64_be(0),
|
||||
Hash256::from_low_u64_be(0),
|
||||
Hash256::from_low_u64_be(0),
|
||||
],
|
||||
]),
|
||||
});
|
||||
|
||||
// BlocksByRoot Response
|
||||
@@ -579,7 +580,7 @@ async fn test_blocks_by_root_chunked_rpc_terminates_correctly() {
|
||||
|
||||
// BlocksByRoot Request
|
||||
let rpc_request = Request::BlocksByRoot(BlocksByRootRequest {
|
||||
block_roots: vec![
|
||||
block_roots: VariableList::from(vec![
|
||||
Hash256::from_low_u64_be(0),
|
||||
Hash256::from_low_u64_be(0),
|
||||
Hash256::from_low_u64_be(0),
|
||||
@@ -590,7 +591,7 @@ async fn test_blocks_by_root_chunked_rpc_terminates_correctly() {
|
||||
Hash256::from_low_u64_be(0),
|
||||
Hash256::from_low_u64_be(0),
|
||||
Hash256::from_low_u64_be(0),
|
||||
],
|
||||
]),
|
||||
});
|
||||
|
||||
// BlocksByRoot Response
|
||||
|
||||
Reference in New Issue
Block a user