From 25bfafbcd14e230d158643f1e81bf66d7278246b Mon Sep 17 00:00:00 2001 From: echevrier Date: Wed, 26 Oct 2022 16:28:05 +0200 Subject: [PATCH] remove debug print messages --- ceremonies/src/lib.rs | 33 --------------------------------- ceremonies/src/tests.rs | 22 ---------------------- 2 files changed, 55 deletions(-) diff --git a/ceremonies/src/lib.rs b/ceremonies/src/lib.rs index 2d7fab72..18cf5a21 100644 --- a/ceremonies/src/lib.rs +++ b/ceremonies/src/lib.rs @@ -518,10 +518,6 @@ pub mod pallet { } >::insert((cid, cindex), newbie.clone(), ()); - println!("Print endorsees:"); - for v in >::iter() { - println!("endorse {:?}", v); - } let new_endorsee_count = Self::endorsee_count((cid, cindex)) .checked_add(1) .ok_or(>::RegistryOverflow)?; @@ -571,10 +567,6 @@ pub mod pallet { &cid, participant ); - println!( - "validating meetup {:?} for cid {:?} triggered by {:?}", - meetup_index, &cid, participant - ); //gather all data let meetup_participants = Self::get_meetup_participants((cid, cindex), meetup_index) @@ -602,13 +594,7 @@ pub mod pallet { // because in attesting phase there could be a failing early payout attempt if current_phase == CeremonyPhaseType::Registering { info!(target: LOG, "marking issuance as completed for failed meetup."); - println!("marking issuance as completed for failed meetup, for meetup {:?} for cid {:?} for cindex {:?}", - meetup_index, cid, cindex); >::insert((cid, cindex), meetup_index, ()); - println!("Print issue rewards in registering:"); - for v in >::iter() { - println!("storage {:?}", v); - } } match err { MeetupValidationError::BallotEmpty => { @@ -616,7 +602,6 @@ pub mod pallet { target: LOG, "ballot empty for meetup {:?}, cid: {:?}", meetup_index, cid ); - println!("ballot empty for meetup {:?}, cid: {:?}", meetup_index, cid); return Err(>::VotesNotDependable.into()) }, MeetupValidationError::NoDependableVote => { @@ -626,10 +611,6 @@ pub mod pallet { meetup_index, cid ); - println!("ballot doesn't reach dependable majority for meetup {:?}, cid: {:?}", - meetup_index, - cid); - return Err(>::VotesNotDependable.into()) }, MeetupValidationError::IndexOutOfBounds => { @@ -637,10 +618,6 @@ pub mod pallet { target: LOG, "index out of bounds for meetup {:?}, cid: {:?}", meetup_index, cid ); - println!( - "index out of bounds for meetup {:?}, cid: {:?}", - meetup_index, cid - ); return Err(>::MeetupValidationIndexOutOfBounds.into()) }, } @@ -653,10 +630,6 @@ pub mod pallet { target: LOG, "early rewards not possible for meetup {:?}, cid: {:?}", meetup_index, cid ); - println!( - "early rewards not possible for meetup {:?}, cid: {:?}", - meetup_index, cid - ); return Err(>::EarlyRewardsNotPossible.into()) } participants_eligible_for_rewards = participant_judgements.legit; @@ -674,10 +647,6 @@ pub mod pallet { reason: p.reason, }); } - println!( - "Call issue_rewards, meetup {:?} for cid {:?} and cindex {:?}", - meetup_index, &cid, cindex - ); Self::issue_rewards( cid, @@ -1911,7 +1880,6 @@ impl Pallet { .get(*i) .ok_or(Error::::MeetupValidationIndexOutOfBounds)?; trace!(target: LOG, "participant merits reward: {:?}", participant); - println!("participant merits reward: {:?}", participant); if >::issue(cid, participant, reward).is_ok() { >::insert( @@ -1925,7 +1893,6 @@ impl Pallet { >::insert((cid, cindex), meetup_idx, ()); info!(target: LOG, "issuing rewards completed"); - println!("issuing rewards completed"); Self::deposit_event(Event::RewardsIssued( cid, diff --git a/ceremonies/src/tests.rs b/ceremonies/src/tests.rs index de1d3aea..9affe7ce 100644 --- a/ceremonies/src/tests.rs +++ b/ceremonies/src/tests.rs @@ -1027,34 +1027,16 @@ fn claim_rewards_error_results_in_meetup_marked_as_completed() { ) .unwrap(); } - println!( - "Call claim_rewards in attesting phase, for cid {:?} and cindex {:?}", - &cid, cindex - ); assert!(EncointerCeremonies::claim_rewards(Origin::signed(account_id(&alice)), cid, None) .is_err()); // nothing happens in attesting phase - println!("storage : {:?}", EncointerCeremonies::issued_rewards((cid, cindex), 1)); - println!("attesting phase storage:"); - for v in IssuedRewards::::iter() { - println!("test storage {:?}", v); - } assert!(!IssuedRewards::::contains_key((cid, cindex), 1)); run_to_next_phase(); // Registering - println!( - "Call claim_rewards in Registering phase, for cid {:?} and cindex {:?}", - &cid, cindex - ); assert!(EncointerCeremonies::claim_rewards(Origin::signed(account_id(&alice)), cid, None) .is_err()); // in registering, the meetup is marked as completed - println!("storage : {:?}", EncointerCeremonies::issued_rewards((cid, cindex), 1)); - println!("registering phase storage:"); - for v in IssuedRewards::::iter() { - println!("test storage {:?}", v); - } assert!(IssuedRewards::::contains_key((cid, cindex), 1)); }); } @@ -1477,10 +1459,6 @@ fn endorse_newbie_works_for_reputables() { cid, account_id(&zoran) )); - println!("Endorsees:"); - for v in >::iter() { - println!("test storage {:?}", v); - } assert!(Endorsees::::contains_key((cid, cindex), &account_id(&zoran))); assert_eq!(BurnedReputableNewbieTickets::::get((cid, cindex), &reputable), 1); assert_eq!(BurnedBootstrapperNewbieTickets::::get(cid, &reputable), 0);