Skip to content

Commit 9565bac

Browse files
committed
Fix discovered bug in rpc tests
1 parent 9cafd21 commit 9565bac

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

beacon_node/lighthouse_network/tests/rpc_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ fn test_tcp_columns_by_root_chunked_rpc() {
10181018
},
10191019
signature: Signature::empty(),
10201020
},
1021-
column: vec![vec![0; E::bytes_per_blob()].try_into().unwrap()]
1021+
column: vec![vec![0; E::bytes_per_cell()].try_into().unwrap()]
10221022
.try_into()
10231023
.unwrap(),
10241024
kzg_commitments: vec![KzgCommitment::empty_for_testing()].try_into().unwrap(),
@@ -1163,7 +1163,7 @@ fn test_tcp_columns_by_range_chunked_rpc() {
11631163
},
11641164
signature: Signature::empty(),
11651165
},
1166-
column: vec![vec![0; E::bytes_per_blob()].try_into().unwrap()]
1166+
column: vec![vec![0; E::bytes_per_cell()].try_into().unwrap()]
11671167
.try_into()
11681168
.unwrap(),
11691169
kzg_commitments: vec![KzgCommitment::empty_for_testing()].try_into().unwrap(),

consensus/types/src/eth_spec.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,11 @@ pub trait EthSpec: 'static + Default + Sync + Send + Clone + Debug + PartialEq +
310310
Self::BytesPerBlob::to_usize()
311311
}
312312

313+
/// Returns the `BYTES_PER_CELL` constant for this specification.
314+
fn bytes_per_cell() -> usize {
315+
Self::BytesPerCell::to_usize()
316+
}
317+
313318
/// Returns the `KZG_COMMITMENT_INCLUSION_PROOF_DEPTH` preset for this specification.
314319
fn kzg_proof_inclusion_proof_depth() -> usize {
315320
Self::KzgCommitmentInclusionProofDepth::to_usize()

0 commit comments

Comments
 (0)