Skip to content

Commit 795f854

Browse files
committed
refactor: decode blob take slice instead of vec ownership
1 parent 334b7e8 commit 795f854

File tree

1 file changed

+2
-2
lines changed
  • batcher/aligned-sdk/src/aggregation_layer

1 file changed

+2
-2
lines changed

batcher/aligned-sdk/src/aggregation_layer/helpers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ pub async fn get_blob_data_from_verified_proof_event(
106106

107107
let blob_bytes =
108108
hex::decode(blob_data.blob.replace("0x", "")).expect("A valid hex encoded data");
109-
let proof_commitments = decoded_blob(blob_bytes);
109+
let proof_commitments = decoded_blob(&blob_bytes);
110110

111111
Ok((merkle_root, proof_commitments))
112112
}
113113

114-
fn decoded_blob(blob_data: Vec<u8>) -> Vec<[u8; 32]> {
114+
fn decoded_blob(blob_data: &[u8]) -> Vec<[u8; 32]> {
115115
let mut proof_hashes = vec![];
116116

117117
let mut current_hash = [0u8; 32];

0 commit comments

Comments
 (0)