Offchain signing followup (#1017)

* Use the fishermanId for AppCrypto on runtimes

* Make sure at least one transaction was submitted

* Use find_map
This commit is contained in:
Rakan Alhneiti
2020-04-22 13:36:27 +02:00
committed by GitHub
parent 97fed89079
commit 283d9d6dc6
4 changed files with 19 additions and 49 deletions
+1 -9
View File
@@ -32,7 +32,6 @@ use runtime_common::{attestations, claims, parachains, registrar, slots,
NegativeImbalance, BlockHashCount, MaximumBlockWeight, AvailableBlockRatio,
MaximumBlockLength,
};
use sp_core::sr25519;
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
ApplyExtrinsicResult, KeyTypeId, Percent, Permill, Perbill, Perquintill, RuntimeDebug,
@@ -517,7 +516,7 @@ parameter_types! {
}
impl parachains::Trait for Runtime {
type AuthorityId = FishermanAuthorityId;
type AuthorityId = parachains::FishermanAuthorityId;
type Origin = Origin;
type Call = Call;
type ParachainCurrency = Balances;
@@ -539,13 +538,6 @@ impl parachains::Trait for Runtime {
type BlockHashConversion = sp_runtime::traits::Identity;
}
pub struct FishermanAuthorityId;
impl system::offchain::AppCrypto<<Signature as Verify>::Signer, Signature> for FishermanAuthorityId {
type RuntimeAppPublic = parachain::FishermanId;
type GenericSignature = sr25519::Signature;
type GenericPublic = sr25519::Public;
}
impl<LocalCall> system::offchain::CreateSignedTransaction<LocalCall> for Runtime where
Call: From<LocalCall>,
{