mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 02:01:40 +00:00
Fixes after rebasing Kintsugi onto unstable (#2799)
* Fix fork choice after rebase * Remove paulhauner warp dep * Fix fork choice test compile errors * Assume fork choice payloads are valid * Add comment * Ignore new tests * Fix error in test skipping
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
//! Provides a mock execution engine HTTP JSON-RPC API for use in testing.
|
||||
|
||||
use crate::engine_api::http::JSONRPC_VERSION;
|
||||
use crate::engine_api::ExecutePayloadResponse;
|
||||
use bytes::Bytes;
|
||||
use environment::null_logger;
|
||||
use handle_rpc::handle_rpc;
|
||||
@@ -60,6 +61,7 @@ impl<T: EthSpec> MockServer<T> {
|
||||
last_echo_request: last_echo_request.clone(),
|
||||
execution_block_generator: RwLock::new(execution_block_generator),
|
||||
preloaded_responses,
|
||||
static_execute_payload_response: <_>::default(),
|
||||
_phantom: PhantomData,
|
||||
});
|
||||
|
||||
@@ -112,6 +114,10 @@ impl<T: EthSpec> MockServer<T> {
|
||||
pub fn push_preloaded_response(&self, response: serde_json::Value) {
|
||||
self.ctx.preloaded_responses.lock().push(response)
|
||||
}
|
||||
|
||||
pub fn all_payloads_valid(&self) {
|
||||
*self.ctx.static_execute_payload_response.lock() = Some(ExecutePayloadResponse::Valid)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -146,6 +152,7 @@ pub struct Context<T: EthSpec> {
|
||||
pub last_echo_request: Arc<RwLock<Option<Bytes>>>,
|
||||
pub execution_block_generator: RwLock<ExecutionBlockGenerator<T>>,
|
||||
pub preloaded_responses: Arc<Mutex<Vec<serde_json::Value>>>,
|
||||
pub static_execute_payload_response: Arc<Mutex<Option<ExecutePayloadResponse>>>,
|
||||
pub _phantom: PhantomData<T>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user