Skip to content

Commit

Permalink
tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-cholakov committed Sep 4, 2023
1 parent cb2b5d4 commit 8b09573
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pallets/summary/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ pub mod pallet {
)),
*root_data.tx_id.as_ref().expect("Non empty roots have valid hash"),
root_data.added_by.ok_or(Error::<T>::CurrentSlotValidatorNotFound)?,
voting_session.state()?.confirmations.to_vec(),
voting_session.state()?.confirmations,
);

if let Err(result) = result {
Expand Down
6 changes: 4 additions & 2 deletions pallets/summary/src/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ use pallet_avn::{
};
use pallet_session as session;
use parking_lot::RwLock;
use sp_avn_common::{safe_add_block_numbers, safe_sub_block_numbers};
use sp_avn_common::{
bounds::MaximumValidatorsBound, safe_add_block_numbers, safe_sub_block_numbers,
};
use sp_core::{
ecdsa,
offchain::{
Expand Down Expand Up @@ -352,7 +354,7 @@ impl CandidateTransactionSubmitter<AccountId> for TestRuntime {
candidate_type: EthTransactionType,
_tx_id: TransactionId,
_submitter: AccountId,
_signatures: Vec<ecdsa::Signature>,
_signatures: BoundedVec<ecdsa::Signature, MaximumValidatorsBound>,
) -> DispatchResult {
if candidate_type !=
EthTransactionType::PublishRoot(PublishRootData::new(
Expand Down
2 changes: 1 addition & 1 deletion pallets/validators-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ impl<T: Config> Pallet<T> {
validators_action_data.reserved_eth_transaction,
validators_action_data.eth_transaction_id,
validators_action_data.primary_validator,
voting_session.state()?.confirmations.to_vec(),
voting_session.state()?.confirmations,
);

if let Err(result) = result {
Expand Down
2 changes: 1 addition & 1 deletion pallets/validators-manager/src/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ impl CandidateTransactionSubmitter<AccountId> for TestRuntime {
_candidate_type: EthTransactionType,
_tx_id: TransactionId,
_submitter: AccountId,
_signatures: Vec<ecdsa::Signature>,
_signatures: BoundedVec<ecdsa::Signature, MaximumValidatorsBound>,
) -> DispatchResult {
Ok(())
}
Expand Down

0 comments on commit 8b09573

Please sign in to comment.