diff --git a/protocol-units/da/movement/protocol/util/src/blob/ir/blob.rs b/protocol-units/da/movement/protocol/util/src/blob/ir/blob.rs index fd81d9cec..d559e9c32 100644 --- a/protocol-units/da/movement/protocol/util/src/blob/ir/blob.rs +++ b/protocol-units/da/movement/protocol/util/src/blob/ir/blob.rs @@ -13,17 +13,17 @@ pub struct InnerSignedBlobV1 where C: Curve, { - pub data: InnerSignedBlobV1Data, - pub signature: Vec, - pub signer: Vec, - pub id: Id, + data: InnerSignedBlobV1Data, + signature: Vec, + signer: Vec, + id: Id, } impl InnerSignedBlobV1 where C: Curve + Verify + Digester, { - pub fn new( + pub(crate) fn new( data: InnerSignedBlobV1Data, signature: Vec, signer: Vec, @@ -165,29 +165,6 @@ where } } -#[cfg(test)] -pub mod test { - - use super::*; - use movement_da_light_node_signer::Signer; - use movement_signer::cryptography::secp256k1::Secp256k1; - use movement_signer_local::signer::LocalSigner; - - #[tokio::test] - async fn test_cannot_change_id_and_verify() -> Result<(), anyhow::Error> { - let blob = InnerSignedBlobV1Data::new(vec![1, 2, 3], 123); - let signer = Signer::new(LocalSigner::::random()); - let signed_blob = blob.try_to_sign(&signer).await?; - - let mut changed_blob = signed_blob.clone(); - changed_blob.id = Id::new(vec![1, 2, 3, 4]); - - assert!(changed_blob.try_verify().is_err()); - - Ok(()) - } -} - pub mod stream_read_response { use movement_da_light_node_proto::*;