mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
merge conflicts
This commit is contained in:
@@ -147,7 +147,7 @@ fn build_rpc_block(
|
||||
RpcBlock::new_with_custody_columns(None, block, columns.clone(), columns.len(), spec)
|
||||
.unwrap()
|
||||
}
|
||||
None => RpcBlock::new_without_blobs(None, block),
|
||||
None => RpcBlock::new_without_blobs(None, block, 0),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,6 +370,7 @@ async fn chain_segment_non_linear_parent_roots() {
|
||||
blocks[3] = RpcBlock::new_without_blobs(
|
||||
None,
|
||||
Arc::new(SignedBeaconBlock::from_block(block, signature)),
|
||||
harness.sampling_column_count,
|
||||
);
|
||||
|
||||
assert!(
|
||||
@@ -407,6 +408,7 @@ async fn chain_segment_non_linear_slots() {
|
||||
blocks[3] = RpcBlock::new_without_blobs(
|
||||
None,
|
||||
Arc::new(SignedBeaconBlock::from_block(block, signature)),
|
||||
harness.sampling_column_count,
|
||||
);
|
||||
|
||||
assert!(
|
||||
@@ -434,6 +436,7 @@ async fn chain_segment_non_linear_slots() {
|
||||
blocks[3] = RpcBlock::new_without_blobs(
|
||||
None,
|
||||
Arc::new(SignedBeaconBlock::from_block(block, signature)),
|
||||
harness.sampling_column_count,
|
||||
);
|
||||
|
||||
assert!(
|
||||
@@ -575,11 +578,16 @@ async fn invalid_signature_gossip_block() {
|
||||
.into_block_error()
|
||||
.expect("should import all blocks prior to the one being tested");
|
||||
let signed_block = SignedBeaconBlock::from_block(block, junk_signature());
|
||||
let rpc_block = RpcBlock::new_without_blobs(
|
||||
None,
|
||||
Arc::new(signed_block),
|
||||
harness.sampling_column_count,
|
||||
);
|
||||
let process_res = harness
|
||||
.chain
|
||||
.process_block(
|
||||
signed_block.canonical_root(),
|
||||
Arc::new(signed_block),
|
||||
rpc_block.block_root(),
|
||||
rpc_block,
|
||||
NotifyExecutionLayer::Yes,
|
||||
BlockImportSource::Lookup,
|
||||
|| Ok(()),
|
||||
@@ -1550,12 +1558,13 @@ async fn add_base_block_to_altair_chain() {
|
||||
));
|
||||
|
||||
// Ensure that it would be impossible to import via `BeaconChain::process_block`.
|
||||
let base_rpc_block = RpcBlock::new_without_blobs(None, Arc::new(base_block.clone()), 0);
|
||||
assert!(matches!(
|
||||
harness
|
||||
.chain
|
||||
.process_block(
|
||||
base_block.canonical_root(),
|
||||
Arc::new(base_block.clone()),
|
||||
base_rpc_block.block_root(),
|
||||
base_rpc_block,
|
||||
NotifyExecutionLayer::Yes,
|
||||
BlockImportSource::Lookup,
|
||||
|| Ok(()),
|
||||
@@ -1573,7 +1582,7 @@ async fn add_base_block_to_altair_chain() {
|
||||
harness
|
||||
.chain
|
||||
.process_chain_segment(
|
||||
vec![RpcBlock::new_without_blobs(None, Arc::new(base_block))],
|
||||
vec![RpcBlock::new_without_blobs(None, Arc::new(base_block), 0)],
|
||||
NotifyExecutionLayer::Yes,
|
||||
)
|
||||
.await,
|
||||
@@ -1686,12 +1695,13 @@ async fn add_altair_block_to_base_chain() {
|
||||
));
|
||||
|
||||
// Ensure that it would be impossible to import via `BeaconChain::process_block`.
|
||||
let altair_rpc_block = RpcBlock::new_without_blobs(None, Arc::new(altair_block.clone()), 0);
|
||||
assert!(matches!(
|
||||
harness
|
||||
.chain
|
||||
.process_block(
|
||||
altair_block.canonical_root(),
|
||||
Arc::new(altair_block.clone()),
|
||||
altair_rpc_block.block_root(),
|
||||
altair_rpc_block,
|
||||
NotifyExecutionLayer::Yes,
|
||||
BlockImportSource::Lookup,
|
||||
|| Ok(()),
|
||||
@@ -1709,7 +1719,7 @@ async fn add_altair_block_to_base_chain() {
|
||||
harness
|
||||
.chain
|
||||
.process_chain_segment(
|
||||
vec![RpcBlock::new_without_blobs(None, Arc::new(altair_block))],
|
||||
vec![RpcBlock::new_without_blobs(None, Arc::new(altair_block), 0)],
|
||||
NotifyExecutionLayer::Yes
|
||||
)
|
||||
.await,
|
||||
@@ -1770,11 +1780,16 @@ async fn import_duplicate_block_unrealized_justification() {
|
||||
// Create two verified variants of the block, representing the same block being processed in
|
||||
// parallel.
|
||||
let notify_execution_layer = NotifyExecutionLayer::Yes;
|
||||
let verified_block1 = block
|
||||
let rpc_block = RpcBlock::new_without_blobs(
|
||||
Some(block_root),
|
||||
block.clone(),
|
||||
harness.sampling_column_count,
|
||||
);
|
||||
let verified_block1 = rpc_block
|
||||
.clone()
|
||||
.into_execution_pending_block(block_root, chain, notify_execution_layer)
|
||||
.unwrap();
|
||||
let verified_block2 = block
|
||||
let verified_block2 = rpc_block
|
||||
.into_execution_pending_block(block_root, chain, notify_execution_layer)
|
||||
.unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user