From 97259789ddbc4966c94841f208b0464e7501ab79 Mon Sep 17 00:00:00 2001 From: Jimmy Chu Date: Mon, 11 May 2020 23:44:20 +0800 Subject: [PATCH] Minor update on example-offchain-worker code and comment (#5970) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Minor update on example-offchain-worker code and comment Signed-off-by: Jimmy Chu * Update frame/system/src/offchain.rs Co-authored-by: Bastian Köcher --- substrate/frame/example-offchain-worker/src/lib.rs | 4 +--- substrate/frame/system/src/offchain.rs | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/substrate/frame/example-offchain-worker/src/lib.rs b/substrate/frame/example-offchain-worker/src/lib.rs index e2c0099094..c3a269e46d 100644 --- a/substrate/frame/example-offchain-worker/src/lib.rs +++ b/substrate/frame/example-offchain-worker/src/lib.rs @@ -45,7 +45,7 @@ use frame_system::{ ensure_signed, ensure_none, offchain::{ - AppCrypto, CreateSignedTransaction, SendUnsignedTransaction, + AppCrypto, CreateSignedTransaction, SendUnsignedTransaction, SendSignedTransaction, SignedPayload, SigningTypes, Signer, SubmitTransaction, } }; @@ -381,8 +381,6 @@ impl Module { /// A helper function to fetch the price and send signed transaction. fn fetch_price_and_send_signed() -> Result<(), &'static str> { - use frame_system::offchain::SendSignedTransaction; - let signer = Signer::::all_accounts(); if !signer.can_sign() { return Err( diff --git a/substrate/frame/system/src/offchain.rs b/substrate/frame/system/src/offchain.rs index 04cd3001e4..43003d657e 100644 --- a/substrate/frame/system/src/offchain.rs +++ b/substrate/frame/system/src/offchain.rs @@ -382,6 +382,7 @@ impl Clone for Account where /// ```ignore /// // im-online specific crypto /// type RuntimeAppPublic = ImOnline(sr25519::Public); +/// /// // wrapped "raw" crypto /// type GenericPublic = sr25519::Public; /// type GenericSignature = sr25519::Signature;