mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-26 20:39:58 +00:00
Remove getters from im-online pallet (#3589)
As I've been dancing around this pallet for quite some time anyway, I decided to remove getters at once. There were only a few leftovers in tests. Related: #3326 CC @muraca
This commit is contained in:
1 parent
aa35328371
commit
4249a3d6cb
3 files changed
+17
-14
No files matched your search
@@ -26,10 +26,7 @@ use sp_core::offchain::{
|
||||
testing::{TestOffchainExt, TestTransactionPoolExt},
|
||||
OffchainDbExt, OffchainWorkerExt, TransactionPoolExt,
|
||||
};
|
||||
use sp_runtime::{
|
||||
testing::UintAuthorityId,
|
||||
transaction_validity::{InvalidTransaction, TransactionValidityError},
|
||||
};
|
||||
use sp_runtime::testing::UintAuthorityId;
|
||||
|
||||
#[test]
|
||||
fn test_unresponsiveness_slash_fraction() {
|
||||
@@ -267,14 +264,14 @@ fn should_cleanup_received_heartbeats_on_session_end() {
|
||||
let _ = heartbeat(1, 2, 0, 1.into(), Session::validators()).unwrap();
|
||||
|
||||
// the heartbeat is stored
|
||||
assert!(!ImOnline::received_heartbeats(&2, &0).is_none());
|
||||
assert!(!super::pallet::ReceivedHeartbeats::<Runtime>::get(2, 0).is_none());
|
||||
|
||||
advance_session();
|
||||
|
||||
// after the session has ended we have already processed the heartbeat
|
||||
// message, so any messages received on the previous session should have
|
||||
// been pruned.
|
||||
assert!(ImOnline::received_heartbeats(&2, &0).is_none());
|
||||
assert!(super::pallet::ReceivedHeartbeats::<Runtime>::get(2, 0).is_none());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user