Skip to content

Commit

Permalink
Added transfers_data array and test file
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiblt1304 committed Feb 15, 2024
1 parent 7ea9e6c commit 18e9254
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 28 deletions.
10 changes: 6 additions & 4 deletions multisigverifier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ pub trait Multisigverifier:
hash_of_hashes: ManagedBuffer,
hash_of_bridge_ops: MultiValueEncoded<ManagedBuffer>,
signature: BlsSignature<Self::Api>,
transfer_data: TransferData<Self::Api>
transfers_data: MultiValueEncoded<TransferData<Self::Api>>
) {
let caller = self.blockchain().get_caller();
let is_bls_valid = self.verify_bls(hash_of_bridge_ops.clone(), &signature, caller);
let mut serialized_transferred_data = ManagedBuffer::new();

if let core::result::Result::Err(err) = transfer_data.top_encode(&mut serialized_transferred_data) {
sc_panic!("Transfer data encode error: {}", err.message_bytes());
}
for transfer in transfers_data {
if let core::result::Result::Err(err) = transfer.top_encode(&mut serialized_transferred_data) {
sc_panic!("Transfer data encode error: {}", err.message_bytes());
}
}

let transfer_data_sha256 = self.crypto().sha256(&serialized_transferred_data);
let transfer_data_hash = transfer_data_sha256.as_managed_buffer();
Expand Down
10 changes: 0 additions & 10 deletions multisigverifier/tests/multisigverifier_scenario_go_test.rs

This file was deleted.

14 changes: 0 additions & 14 deletions multisigverifier/tests/multisigverifier_scenario_rs_test.rs

This file was deleted.

Empty file.

0 comments on commit 18e9254

Please sign in to comment.