Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Commit 0bb8f82

Browse files
authored
Merge branch 'main' into rf/cleanup-supervisor-rpc
2 parents 6b7d484 + e61aa2e commit 0bb8f82

File tree

14 files changed

+17
-7
lines changed

14 files changed

+17
-7
lines changed

crates/protocol/src/batch/core.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ impl Batch {
7474
mod tests {
7575
use super::*;
7676
use crate::{SpanBatchElement, SpanBatchError, SpanBatchTransactions};
77+
use alloc::{vec, vec::Vec};
7778
use alloy_consensus::{Signed, TxEip2930, TxEnvelope};
7879
use alloy_primitives::{address, hex, Bytes, PrimitiveSignature as Signature, TxKind};
7980

crates/protocol/src/batch/inclusion.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ impl BatchWithInclusionBlock {
4747
mod tests {
4848
use super::*;
4949
use crate::test_utils::TestBatchValidator;
50+
use alloc::vec;
5051

5152
#[tokio::test]
5253
async fn test_single_batch_with_inclusion_block() {

crates/protocol/src/batch/single.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ impl SingleBatch {
175175
#[cfg(test)]
176176
mod tests {
177177
use super::*;
178+
use alloc::vec;
178179
use alloy_consensus::{SignableTransaction, TxEip1559, TxEip7702, TxEnvelope};
179180
use alloy_eips::eip2718::{Decodable2718, Encodable2718};
180181
use alloy_primitives::{Address, PrimitiveSignature, Sealed, TxKind, U256};

crates/protocol/src/batch/transactions.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ impl SpanBatchTransactions {
350350
#[cfg(test)]
351351
mod tests {
352352
use super::*;
353+
use alloc::vec;
353354
use alloy_consensus::{Signed, TxEip1559, TxEip2930, TxEip7702};
354355
use alloy_primitives::{address, PrimitiveSignature as Signature, TxKind};
355356

crates/protocol/src/batch/tx_data/eip7702.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl SpanBatchEip7702TransactionData {
6666
mod test {
6767
use super::*;
6868
use crate::SpanBatchTransactionData;
69-
use alloc::vec::Vec;
69+
use alloc::{vec, vec::Vec};
7070
use alloy_rlp::{Decodable, Encodable};
7171
use revm::primitives::Authorization;
7272

crates/protocol/src/block.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use op_alloy_consensus::OpBlock;
99

1010
/// Block Header Info
1111
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
12-
#[cfg_attr(any(test, feature = "arbitrary"), derive(arbitrary::Arbitrary))]
12+
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1313
#[derive(Debug, Clone, Copy, Eq, Hash, PartialEq, Default)]
1414
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
1515
pub struct BlockInfo {
@@ -78,7 +78,7 @@ pub struct L2BlockInfo {
7878
pub seq_num: u64,
7979
}
8080

81-
#[cfg(any(test, feature = "arbitrary"))]
81+
#[cfg(feature = "arbitrary")]
8282
impl arbitrary::Arbitrary<'_> for L2BlockInfo {
8383
fn arbitrary(g: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result<Self> {
8484
Ok(Self {
@@ -173,6 +173,7 @@ impl L2BlockInfo {
173173
#[cfg(test)]
174174
mod tests {
175175
use super::*;
176+
use alloc::string::ToString;
176177
use alloy_consensus::{Header, TxEnvelope};
177178
use alloy_primitives::b256;
178179

crates/protocol/src/info/bedrock.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ impl L1BlockInfoBedrock {
116116
#[cfg(test)]
117117
mod tests {
118118
use super::*;
119+
use alloc::vec;
119120

120121
#[test]
121122
fn test_decode_calldata_bedrock_invalid_length() {

crates/protocol/src/info/ecotone.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ impl L1BlockInfoEcotone {
151151
#[cfg(test)]
152152
mod tests {
153153
use super::*;
154+
use alloc::vec;
154155

155156
#[test]
156157
fn test_decode_calldata_ecotone_invalid_length() {

crates/protocol/src/info/interop.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ impl L1BlockInfoInterop {
134134
#[cfg(test)]
135135
mod tests {
136136
use super::*;
137+
use alloc::vec;
137138

138139
#[test]
139140
fn test_decode_calldata_interop_invalid_length() {

crates/protocol/src/info/isthmus.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ impl L1BlockInfoIsthmus {
155155
#[cfg(test)]
156156
mod tests {
157157
use super::*;
158+
use alloc::vec;
158159

159160
#[test]
160161
fn test_decode_calldata_isthmus_invalid_length() {

crates/protocol/src/info/variant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ mod test {
337337
use crate::test_utils::{
338338
RAW_BEDROCK_INFO_TX, RAW_ECOTONE_INFO_TX, RAW_INTEROP_INFO_TX, RAW_ISTHMUS_INFO_TX,
339339
};
340-
use alloc::string::ToString;
340+
use alloc::{string::ToString, vec::Vec};
341341
use alloy_primitives::{address, b256};
342342

343343
#[test]

crates/protocol/src/iter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ impl Iterator for FrameIter<'_> {
4545
#[cfg(test)]
4646
mod tests {
4747
use super::*;
48+
use alloc::{vec, vec::Vec};
4849

4950
#[test]
5051
fn test_iterate_none() {

crates/protocol/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
)]
66
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
77
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
8-
#![cfg_attr(not(any(test, feature = "std")), no_std)]
8+
#![cfg_attr(not(feature = "std"), no_std)]
99

1010
extern crate alloc;
1111

crates/protocol/src/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ pub fn read_tx_data(r: &mut &[u8]) -> Result<(Vec<u8>, TxType), SpanBatchError>
154154
mod tests {
155155
use super::*;
156156
use crate::test_utils::{RAW_BEDROCK_INFO_TX, RAW_ECOTONE_INFO_TX, RAW_ISTHMUS_INFO_TX};
157+
use alloc::vec;
157158
use alloy_eips::eip1898::BlockNumHash;
158159
use alloy_primitives::{address, hex, uint, U256};
159160
use maili_genesis::ChainGenesis;
@@ -223,7 +224,6 @@ mod tests {
223224

224225
#[test]
225226
fn test_to_system_config_non_deposit() {
226-
use alloy_primitives::U256;
227227
let block = OpBlock {
228228
header: alloy_consensus::Header { number: 1, ..Default::default() },
229229
body: alloy_consensus::BlockBody {
@@ -235,7 +235,7 @@ mod tests {
235235
gas_price: 1,
236236
gas_limit: 1,
237237
to: alloy_primitives::TxKind::Create,
238-
value: alloy_primitives::U256::ZERO,
238+
value: U256::ZERO,
239239
input: alloy_primitives::Bytes::new(),
240240
},
241241
alloy_primitives::PrimitiveSignature::new(U256::ZERO, U256::ZERO, false),

0 commit comments

Comments
 (0)