RPC calls should execute with configured strategy
@@ -30,7 +30,7 @@ use sp_blockchain::{
Result as ClientResult, Error as ClientError, HeaderMetadata, CachedHeaderMetadata
};
use sc_client::{
- Client, CallExecutor, BlockchainEvents,
+ Client, CallExecutor, BlockchainEvents
};
use sp_core::{
Bytes, storage::{well_known_keys, StorageKey, StorageData, StorageChangeSet, ChildInfo},
@@ -213,8 +213,7 @@ impl<B, E, Block: BlockT, RA> FullState<B, E, Block, RA>
}
}
-impl<B, E, Block, RA> StateBackend<B, E, Block, RA> for FullState<B, E, Block, RA>
- where
+impl<B, E, Block, RA> StateBackend<B, E, Block, RA> for FullState<B, E, Block, RA> where
Block: BlockT + 'static,
B: Backend<Block> + Send + Sync + 'static,
E: CallExecutor<Block> + Send + Sync + 'static + Clone,
@@ -229,21 +228,20 @@ impl<B, E, Block, RA> StateBackend<B, E, Block, RA> for FullState<B, E, Block, R
method: String,
call_data: Bytes,
) -> FutureResult<Bytes> {
- Box::new(result(
- self.block_or_best(block)
- .and_then(|block|
- self
+ let r = self.block_or_best(block)
+ .and_then(|block| self
.client
.executor()
.call(
&BlockId::Hash(block),
&method,
&*call_data,
- ExecutionStrategy::NativeElseWasm,
+ self.client.execution_extensions().strategies().other,
None,
)
- .map(Into::into))
- .map_err(client_err)))
+ .map(Into::into)
+ ).map_err(client_err);
+ Box::new(result(r))
}
fn storage_keys(
