Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix compilation.?
  • Loading branch information
tomusdrw committed Nov 15, 2019
commit 530d36083155c4d188128d7c5508da74e9cda0ea
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ codec = { package = "parity-scale-codec", version = "1.0.0", default-features =
consensus = { package = "substrate-consensus-common", path = "../../primitives/consensus/common" }
derive_more = { version = "0.15.0" }
executor = { package = "substrate-executor", path = "../executor" }
externalities = { package = "substrate-externalities", path = "../../primitives/externalities" }
fnv = { version = "1.0.6" }
futures = { version = "0.1.29" }
futures03 = { package = "futures-preview", version = "0.3.0-alpha.19", features = ["compat"] }
Expand Down
2 changes: 1 addition & 1 deletion client/api/src/call_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use state_machine::{
use executor::{RuntimeVersion, NativeVersion};
use externalities::Extensions;
use hash_db::Hasher;
use primitives::{offchain::OffchainExt, Blake2Hasher, NativeOrEncoded};
use primitives::{Blake2Hasher, NativeOrEncoded};

use sr_api::{ProofRecorder, InitializeBlock};
use crate::error;
Expand Down
2 changes: 1 addition & 1 deletion primitives/core/src/offchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ pub trait TransactionPool {

#[cfg(feature = "std")]
externalities::decl_extension! {
pub struct TransactionPoolExt(Box<dyn TransactionPool>);
pub struct TransactionPoolExt(Box<dyn TransactionPool + Send>);
}


Expand Down
7 changes: 5 additions & 2 deletions primitives/sr-io/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ use rstd::ops::Deref;

#[cfg(feature = "std")]
use primitives::{
crypto::Pair, traits::KeystoreExt, offchain::OffchainExt, hexdisplay::HexDisplay,
crypto::Pair,
traits::KeystoreExt,
offchain::{OffchainExt, TransactionPoolExt},
hexdisplay::HexDisplay,
storage::ChildStorageKey,
};

Expand Down Expand Up @@ -424,7 +427,7 @@ pub trait Offchain {
///
/// The transaction will end up in the pool.
fn submit_transaction(&mut self, data: Vec<u8>) -> Result<(), ()> {
self.extension::<OffchainExt>()
self.extension::<TransactionPoolExt>()
.expect("submit_transaction can be called only in the offchain worker context")
.submit_transaction(data)
}
Expand Down