Migrate pallet-im-online to pallet attribute macro. (#8714)

* Migrate pallet-im-online to pallet attribute macro.

* Move validate_unsigned into pallet macro.

* fix metadata

* fix test

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
Shaun WangandGuillaume Thiolliere authored and GitHub committed 2021-05-05 14:03:21 +00:00
1 parent fc449c8aad
commit d0efe2d1c2
4 files changed
+218 -179

No files matched your search

+2 -2
View File
@@ -29,7 +29,7 @@ use sp_core::offchain::{
testing::{TestOffchainExt, TestTransactionPoolExt},
};
use frame_support::{dispatch, assert_noop};
use sp_runtime::{testing::UintAuthorityId, transaction_validity::TransactionValidityError};
use sp_runtime::{testing::UintAuthorityId, transaction_validity::{TransactionValidityError, InvalidTransaction}};
#[test]
fn test_unresponsiveness_slash_fraction() {
@@ -114,7 +114,7 @@ fn heartbeat(
authority_index: u32,
id: UintAuthorityId,
validators: Vec<u64>,
) -> dispatch::DispatchResult {
) -> dispatch::DispatchResultWithPostInfo {
use frame_support::unsigned::ValidateUnsigned;
let heartbeat = Heartbeat {