Minor update on example-offchain-worker code and comment (#5970)

* Minor update on example-offchain-worker code and comment

Signed-off-by: Jimmy Chu <jimmychu0807@gmail.com>

* Update frame/system/src/offchain.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Jimmy Chu
2020-05-11 23:44:20 +08:00
committed by GitHub
parent e5a36c8fa9
commit 97259789dd
2 changed files with 2 additions and 3 deletions
@@ -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<T: Trait> Module<T> {
/// 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::<T, T::AuthorityId>::all_accounts();
if !signer.can_sign() {
return Err(
+1
View File
@@ -382,6 +382,7 @@ impl<T: SigningTypes> Clone for Account<T> where
/// ```ignore
/// // im-online specific crypto
/// type RuntimeAppPublic = ImOnline(sr25519::Public);
///
/// // wrapped "raw" crypto
/// type GenericPublic = sr25519::Public;
/// type GenericSignature = sr25519::Signature;