mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 23:57:56 +00:00
The crate rename (#4223)
* Adding script for rename, could be applicable for nodes on top of it, too * add stderr and gitlab ci features * apply script * fix now minor details in expected stderr * Update the Cargo.lock * fix name: sc-transaction -> sc-tracing * fix rename in script, too
This commit is contained in:
committed by
GitHub
parent
40f6d05a4c
commit
927e13c13a
@@ -14,9 +14,9 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use sr_api::{RuntimeApiInfo, decl_runtime_apis, impl_runtime_apis};
|
||||
use sp_api::{RuntimeApiInfo, decl_runtime_apis, impl_runtime_apis};
|
||||
|
||||
use sr_primitives::{traits::{GetNodeBlockType, Block as BlockT}, generic::BlockId};
|
||||
use sp_runtime::{traits::{GetNodeBlockType, Block as BlockT}, generic::BlockId};
|
||||
|
||||
use test_client::runtime::Block;
|
||||
use sp_blockchain::Result;
|
||||
@@ -68,8 +68,8 @@ impl_runtime_apis! {
|
||||
fn same_name() {}
|
||||
}
|
||||
|
||||
impl sr_api::Core<Block> for Runtime {
|
||||
fn version() -> sr_version::RuntimeVersion {
|
||||
impl sp_api::Core<Block> for Runtime {
|
||||
fn version() -> sp_version::RuntimeVersion {
|
||||
unimplemented!()
|
||||
}
|
||||
fn execute_block(_: Block) {
|
||||
@@ -124,5 +124,5 @@ fn check_runtime_api_versions_contains<T: RuntimeApiInfo + ?Sized>() {
|
||||
fn check_runtime_api_versions() {
|
||||
check_runtime_api_versions_contains::<dyn Api<Block, Error = ()>>();
|
||||
check_runtime_api_versions_contains::<dyn ApiWithCustomVersion<Block, Error = ()>>();
|
||||
check_runtime_api_versions_contains::<dyn sr_api::Core<Block, Error = ()>>();
|
||||
check_runtime_api_versions_contains::<dyn sp_api::Core<Block, Error = ()>>();
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ use test_client::{
|
||||
DefaultTestClientBuilderExt, TestClientBuilder,
|
||||
runtime::{TestAPI, DecodeFails, Transfer, Header},
|
||||
};
|
||||
use sr_primitives::{
|
||||
use sp_runtime::{
|
||||
generic::BlockId,
|
||||
traits::{ProvideRuntimeApi, Header as HeaderT, Hash as HashT},
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
sr_api::decl_runtime_apis! {
|
||||
sp_api::decl_runtime_apis! {
|
||||
pub trait Api {
|
||||
fn test(&self);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use sr_primitives::traits::GetNodeBlockType;
|
||||
use sp_runtime::traits::GetNodeBlockType;
|
||||
use test_client::runtime::Block;
|
||||
|
||||
/// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType`
|
||||
@@ -8,7 +8,7 @@ impl GetNodeBlockType for Runtime {
|
||||
type NodeBlock = Block;
|
||||
}
|
||||
|
||||
sr_api::decl_runtime_apis! {
|
||||
sp_api::decl_runtime_apis! {
|
||||
pub trait Api {
|
||||
#[changed_in(2)]
|
||||
fn test(data: u64);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use sr_primitives::traits::Block as BlockT;
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
|
||||
sr_api::decl_runtime_apis! {
|
||||
sp_api::decl_runtime_apis! {
|
||||
pub trait Api<Block: BlockT> {
|
||||
fn test();
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@ error: `Block: BlockT` generic parameter will be added automatically by the `dec
|
||||
4 | pub trait Api<Block: BlockT> {
|
||||
| ^^^^^^
|
||||
|
||||
warning: unused import: `sr_primitives::traits::Block as BlockT`
|
||||
warning: unused import: `sp_runtime::traits::Block as BlockT`
|
||||
--> $DIR/declaring_old_block.rs:1:5
|
||||
|
|
||||
1 | use sr_primitives::traits::Block as BlockT;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
1 | use sp_runtime::traits::Block as BlockT;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(unused_imports)]` on by default
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
use sr_primitives::traits::Block as BlockT;
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
|
||||
sr_api::decl_runtime_apis! {
|
||||
sp_api::decl_runtime_apis! {
|
||||
pub trait Api<B: BlockT> {
|
||||
fn test();
|
||||
}
|
||||
|
||||
+3
-3
@@ -4,10 +4,10 @@ error: `Block: BlockT` generic parameter will be added automatically by the `dec
|
||||
4 | pub trait Api<B: BlockT> {
|
||||
| ^^^^^^
|
||||
|
||||
warning: unused import: `sr_primitives::traits::Block as BlockT`
|
||||
warning: unused import: `sp_runtime::traits::Block as BlockT`
|
||||
--> $DIR/declaring_own_block_with_different_name.rs:1:5
|
||||
|
|
||||
1 | use sr_primitives::traits::Block as BlockT;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
1 | use sp_runtime::traits::Block as BlockT;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(unused_imports)]` on by default
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use sr_primitives::traits::GetNodeBlockType;
|
||||
use sp_runtime::traits::GetNodeBlockType;
|
||||
use test_client::runtime::Block;
|
||||
|
||||
/// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType`
|
||||
@@ -8,12 +8,12 @@ impl GetNodeBlockType for Runtime {
|
||||
type NodeBlock = Block;
|
||||
}
|
||||
|
||||
sr_api::decl_runtime_apis! {
|
||||
sp_api::decl_runtime_apis! {
|
||||
pub trait Api {
|
||||
fn test(data: u64);
|
||||
}
|
||||
}
|
||||
|
||||
sr_api::impl_runtime_apis! {}
|
||||
sp_api::impl_runtime_apis! {}
|
||||
|
||||
fn main() {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: No api implementation given!
|
||||
--> $DIR/empty_impl_runtime_apis_call.rs:17:1
|
||||
|
|
||||
17 | sr_api::impl_runtime_apis! {}
|
||||
17 | sp_api::impl_runtime_apis! {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use sr_primitives::traits::{GetNodeBlockType, Block as BlockT};
|
||||
use sp_runtime::traits::{GetNodeBlockType, Block as BlockT};
|
||||
use test_client::runtime::Block;
|
||||
|
||||
/// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType`
|
||||
@@ -8,18 +8,18 @@ impl GetNodeBlockType for Runtime {
|
||||
type NodeBlock = Block;
|
||||
}
|
||||
|
||||
sr_api::decl_runtime_apis! {
|
||||
sp_api::decl_runtime_apis! {
|
||||
pub trait Api {
|
||||
fn test(data: u64);
|
||||
}
|
||||
}
|
||||
|
||||
sr_api::impl_runtime_apis! {
|
||||
sp_api::impl_runtime_apis! {
|
||||
impl self::Api<Block> for Runtime {
|
||||
fn test(data: String) {}
|
||||
}
|
||||
|
||||
impl sr_api::Core<Block> for Runtime {
|
||||
impl sp_api::Core<Block> for Runtime {
|
||||
fn version() -> runtime_api::RuntimeVersion {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
@@ -19,14 +19,14 @@ error[E0053]: method `test` has an incompatible type for trait
|
||||
error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for trait
|
||||
--> $DIR/impl_incorrect_method_signature.rs:17:1
|
||||
|
|
||||
11 | / sr_api::decl_runtime_apis! {
|
||||
11 | / sp_api::decl_runtime_apis! {
|
||||
12 | | pub trait Api {
|
||||
13 | | fn test(data: u64);
|
||||
14 | | }
|
||||
15 | | }
|
||||
| |_- type in trait
|
||||
16 |
|
||||
17 | sr_api::impl_runtime_apis! {
|
||||
17 | sp_api::impl_runtime_apis! {
|
||||
| -^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| _expected u64, found struct `std::string::String`
|
||||
@@ -39,13 +39,13 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
|
||||
33 | | }
|
||||
| |_- in this macro invocation
|
||||
|
|
||||
= note: expected type `fn(&RuntimeApiImpl<RuntimeApiImplCall>, &sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::BlockId<sr_primitives::generic::block::Block<sr_primitives::generic::header::Header<u64, sr_primitives::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<u8>) -> std::result::Result<sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::NativeOrEncoded<()>, <RuntimeApiImplCall as sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::CallRuntimeAt<sr_primitives::generic::block::Block<sr_primitives::generic::header::Header<u64, sr_primitives::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>>::Error>`
|
||||
found type `fn(&RuntimeApiImpl<RuntimeApiImplCall>, &sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::BlockId<sr_primitives::generic::block::Block<sr_primitives::generic::header::Header<u64, sr_primitives::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::ExecutionContext, std::option::Option<std::string::String>, std::vec::Vec<u8>) -> std::result::Result<sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::NativeOrEncoded<()>, <RuntimeApiImplCall as sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::CallRuntimeAt<sr_primitives::generic::block::Block<sr_primitives::generic::header::Header<u64, sr_primitives::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>>::Error>`
|
||||
= note: expected type `fn(&RuntimeApiImpl<RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<u8>) -> std::result::Result<sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::NativeOrEncoded<()>, <RuntimeApiImplCall as sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::CallRuntimeAt<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>>::Error>`
|
||||
found type `fn(&RuntimeApiImpl<RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<std::string::String>, std::vec::Vec<u8>) -> std::result::Result<sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::NativeOrEncoded<()>, <RuntimeApiImplCall as sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::CallRuntimeAt<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>>::Error>`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/impl_incorrect_method_signature.rs:17:1
|
||||
|
|
||||
17 | / sr_api::impl_runtime_apis! {
|
||||
17 | / sp_api::impl_runtime_apis! {
|
||||
18 | | impl self::Api<Block> for Runtime {
|
||||
19 | | fn test(data: String) {}
|
||||
20 | | }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use sr_primitives::traits::GetNodeBlockType;
|
||||
use sp_runtime::traits::GetNodeBlockType;
|
||||
use test_client::runtime::Block;
|
||||
|
||||
/// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType`
|
||||
@@ -8,7 +8,7 @@ impl GetNodeBlockType for Runtime {
|
||||
type NodeBlock = Block;
|
||||
}
|
||||
|
||||
sr_api::decl_runtime_apis! {
|
||||
sp_api::decl_runtime_apis! {
|
||||
pub trait Api {
|
||||
fn test(data: u64);
|
||||
}
|
||||
@@ -24,7 +24,7 @@ mod second {
|
||||
}
|
||||
}
|
||||
|
||||
sr_api::impl_runtime_apis! {
|
||||
sp_api::impl_runtime_apis! {
|
||||
impl self::Api<Block> for Runtime {
|
||||
fn test(data: u64) {}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ error: cannot find macro `decl_runtime_apis` in this scope
|
||||
error[E0425]: cannot find function `test2_call_api_at` in `second::runtime_decl_for_Api`
|
||||
--> $DIR/impl_two_traits_with_same_name.rs:27:1
|
||||
|
|
||||
27 | / sr_api::impl_runtime_apis! {
|
||||
27 | / sp_api::impl_runtime_apis! {
|
||||
28 | | impl self::Api<Block> for Runtime {
|
||||
29 | | fn test(data: u64) {}
|
||||
30 | | }
|
||||
@@ -28,7 +28,7 @@ error[E0425]: cannot find function `test2_call_api_at` in `second::runtime_decl_
|
||||
error[E0425]: cannot find function `test2_native_call_generator` in `second::runtime_decl_for_Api`
|
||||
--> $DIR/impl_two_traits_with_same_name.rs:27:1
|
||||
|
|
||||
27 | / sr_api::impl_runtime_apis! {
|
||||
27 | / sp_api::impl_runtime_apis! {
|
||||
28 | | impl self::Api<Block> for Runtime {
|
||||
29 | | fn test(data: u64) {}
|
||||
30 | | }
|
||||
@@ -49,7 +49,7 @@ error[E0576]: cannot find method or associated constant `test2` in `second::runt
|
||||
error[E0603]: module `runtime_decl_for_Api` is private
|
||||
--> $DIR/impl_two_traits_with_same_name.rs:27:1
|
||||
|
|
||||
27 | / sr_api::impl_runtime_apis! {
|
||||
27 | / sp_api::impl_runtime_apis! {
|
||||
28 | | impl self::Api<Block> for Runtime {
|
||||
29 | | fn test(data: u64) {}
|
||||
30 | | }
|
||||
@@ -58,7 +58,7 @@ error[E0603]: module `runtime_decl_for_Api` is private
|
||||
35 | | }
|
||||
| |_^
|
||||
|
||||
error[E0119]: conflicting implementations of trait `runtime_decl_for_Api::Api<sr_primitives::generic::block::Block<sr_primitives::generic::header::Header<u64, sr_primitives::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>` for type `Runtime`:
|
||||
error[E0119]: conflicting implementations of trait `runtime_decl_for_Api::Api<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>` for type `Runtime`:
|
||||
--> $DIR/impl_two_traits_with_same_name.rs:32:2
|
||||
|
|
||||
28 | impl self::Api<Block> for Runtime {
|
||||
@@ -67,7 +67,7 @@ error[E0119]: conflicting implementations of trait `runtime_decl_for_Api::Api<sr
|
||||
32 | impl second::Api<Block> for Runtime {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Runtime`
|
||||
|
||||
error[E0119]: conflicting implementations of trait `Api<sr_primitives::generic::block::Block<sr_primitives::generic::header::Header<u64, sr_primitives::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>` for type `RuntimeApiImpl<_>`:
|
||||
error[E0119]: conflicting implementations of trait `Api<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>` for type `RuntimeApiImpl<_>`:
|
||||
--> $DIR/impl_two_traits_with_same_name.rs:32:2
|
||||
|
|
||||
28 | impl self::Api<Block> for Runtime {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
sr_api::decl_runtime_apis! {
|
||||
sp_api::decl_runtime_apis! {
|
||||
#[api_version]
|
||||
pub trait Api {
|
||||
fn test(data: u64);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error: can't qualify macro invocation with `pub`
|
||||
--> $DIR/invalid_api_version.rs:1:1
|
||||
|
|
||||
1 | / sr_api::decl_runtime_apis! {
|
||||
1 | / sp_api::decl_runtime_apis! {
|
||||
2 | | #[api_version]
|
||||
3 | | pub trait Api {
|
||||
4 | | fn test(data: u64);
|
||||
@@ -16,7 +16,7 @@ error: can't qualify macro invocation with `pub`
|
||||
error: Unexpected `api_version` attribute. The supported format is `api_version(1)`
|
||||
--> $DIR/invalid_api_version.rs:1:1
|
||||
|
|
||||
1 | / sr_api::decl_runtime_apis! {
|
||||
1 | / sp_api::decl_runtime_apis! {
|
||||
2 | | #[api_version]
|
||||
3 | | pub trait Api {
|
||||
4 | | fn test(data: u64);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
sr_api::decl_runtime_apis! {
|
||||
sp_api::decl_runtime_apis! {
|
||||
#[api_version("1")]
|
||||
pub trait Api {
|
||||
fn test(data: u64);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error: can't qualify macro invocation with `pub`
|
||||
--> $DIR/invalid_api_version_2.rs:1:1
|
||||
|
|
||||
1 | / sr_api::decl_runtime_apis! {
|
||||
1 | / sp_api::decl_runtime_apis! {
|
||||
2 | | #[api_version("1")]
|
||||
3 | | pub trait Api {
|
||||
4 | | fn test(data: u64);
|
||||
@@ -16,7 +16,7 @@ error: can't qualify macro invocation with `pub`
|
||||
error: Unexpected `api_version` attribute. The supported format is `api_version(1)`
|
||||
--> $DIR/invalid_api_version_2.rs:1:1
|
||||
|
|
||||
1 | / sr_api::decl_runtime_apis! {
|
||||
1 | / sp_api::decl_runtime_apis! {
|
||||
2 | | #[api_version("1")]
|
||||
3 | | pub trait Api {
|
||||
4 | | fn test(data: u64);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
sr_api::decl_runtime_apis! {
|
||||
sp_api::decl_runtime_apis! {
|
||||
#[api_version()]
|
||||
pub trait Api {
|
||||
fn test(data: u64);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error: can't qualify macro invocation with `pub`
|
||||
--> $DIR/invalid_api_version_3.rs:1:1
|
||||
|
|
||||
1 | / sr_api::decl_runtime_apis! {
|
||||
1 | / sp_api::decl_runtime_apis! {
|
||||
2 | | #[api_version()]
|
||||
3 | | pub trait Api {
|
||||
4 | | fn test(data: u64);
|
||||
@@ -16,7 +16,7 @@ error: can't qualify macro invocation with `pub`
|
||||
error: Unexpected `api_version` attribute. The supported format is `api_version(1)`
|
||||
--> $DIR/invalid_api_version_3.rs:1:1
|
||||
|
|
||||
1 | / sr_api::decl_runtime_apis! {
|
||||
1 | / sp_api::decl_runtime_apis! {
|
||||
2 | | #[api_version()]
|
||||
3 | | pub trait Api {
|
||||
4 | | fn test(data: u64);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use sr_primitives::traits::GetNodeBlockType;
|
||||
use sp_runtime::traits::GetNodeBlockType;
|
||||
use test_client::runtime::Block;
|
||||
|
||||
/// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType`
|
||||
@@ -8,13 +8,13 @@ impl GetNodeBlockType for Runtime {
|
||||
type NodeBlock = Block;
|
||||
}
|
||||
|
||||
sr_api::decl_runtime_apis! {
|
||||
sp_api::decl_runtime_apis! {
|
||||
pub trait Api {
|
||||
fn test(data: u64);
|
||||
}
|
||||
}
|
||||
|
||||
sr_api::impl_runtime_apis! {
|
||||
sp_api::impl_runtime_apis! {
|
||||
impl self::Api for Runtime {
|
||||
fn test(data: u64) {
|
||||
unimplemented!()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use sr_primitives::traits::GetNodeBlockType;
|
||||
use sp_runtime::traits::GetNodeBlockType;
|
||||
use test_client::runtime::Block;
|
||||
|
||||
/// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType`
|
||||
@@ -8,13 +8,13 @@ impl GetNodeBlockType for Runtime {
|
||||
type NodeBlock = Block;
|
||||
}
|
||||
|
||||
sr_api::decl_runtime_apis! {
|
||||
sp_api::decl_runtime_apis! {
|
||||
pub trait Api {
|
||||
fn test(data: u64);
|
||||
}
|
||||
}
|
||||
|
||||
sr_api::impl_runtime_apis! {
|
||||
sp_api::impl_runtime_apis! {
|
||||
impl Api<Block> for Runtime {
|
||||
fn test(data: u64) {
|
||||
unimplemented!()
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
use sr_primitives::traits::{GetNodeBlockType, Block as BlockT};
|
||||
use sp_runtime::traits::{GetNodeBlockType, Block as BlockT};
|
||||
use test_client::runtime::Block;
|
||||
|
||||
/// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType`
|
||||
@@ -8,20 +8,20 @@ impl GetNodeBlockType for Runtime {
|
||||
type NodeBlock = Block;
|
||||
}
|
||||
|
||||
sr_api::decl_runtime_apis! {
|
||||
sp_api::decl_runtime_apis! {
|
||||
pub trait Api {
|
||||
fn test(data: u64);
|
||||
}
|
||||
}
|
||||
|
||||
sr_api::impl_runtime_apis! {
|
||||
sp_api::impl_runtime_apis! {
|
||||
impl self::Api<Block> for Runtime {
|
||||
fn test(data: &u64) {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
impl sr_api::Core<Block> for Runtime {
|
||||
impl sp_api::Core<Block> for Runtime {
|
||||
fn version() -> runtime_api::RuntimeVersion {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
+5
-5
@@ -19,14 +19,14 @@ error[E0053]: method `test` has an incompatible type for trait
|
||||
error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for trait
|
||||
--> $DIR/type_reference_in_impl_runtime_apis_call.rs:17:1
|
||||
|
|
||||
11 | / sr_api::decl_runtime_apis! {
|
||||
11 | / sp_api::decl_runtime_apis! {
|
||||
12 | | pub trait Api {
|
||||
13 | | fn test(data: u64);
|
||||
14 | | }
|
||||
15 | | }
|
||||
| |_- type in trait
|
||||
16 |
|
||||
17 | sr_api::impl_runtime_apis! {
|
||||
17 | sp_api::impl_runtime_apis! {
|
||||
| -^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| _expected u64, found &u64
|
||||
@@ -39,13 +39,13 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
|
||||
35 | | }
|
||||
| |_- in this macro invocation
|
||||
|
|
||||
= note: expected type `fn(&RuntimeApiImpl<RuntimeApiImplCall>, &sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::BlockId<sr_primitives::generic::block::Block<sr_primitives::generic::header::Header<u64, sr_primitives::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<u8>) -> std::result::Result<sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::NativeOrEncoded<()>, <RuntimeApiImplCall as sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::CallRuntimeAt<sr_primitives::generic::block::Block<sr_primitives::generic::header::Header<u64, sr_primitives::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>>::Error>`
|
||||
found type `fn(&RuntimeApiImpl<RuntimeApiImplCall>, &sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::BlockId<sr_primitives::generic::block::Block<sr_primitives::generic::header::Header<u64, sr_primitives::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::ExecutionContext, std::option::Option<&u64>, std::vec::Vec<u8>) -> std::result::Result<sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::NativeOrEncoded<()>, <RuntimeApiImplCall as sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::CallRuntimeAt<sr_primitives::generic::block::Block<sr_primitives::generic::header::Header<u64, sr_primitives::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>>::Error>`
|
||||
= note: expected type `fn(&RuntimeApiImpl<RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<u8>) -> std::result::Result<sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::NativeOrEncoded<()>, <RuntimeApiImplCall as sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::CallRuntimeAt<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>>::Error>`
|
||||
found type `fn(&RuntimeApiImpl<RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<&u64>, std::vec::Vec<u8>) -> std::result::Result<sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::NativeOrEncoded<()>, <RuntimeApiImplCall as sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::CallRuntimeAt<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime::Extrinsic>>>::Error>`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/type_reference_in_impl_runtime_apis_call.rs:17:1
|
||||
|
|
||||
17 | / sr_api::impl_runtime_apis! {
|
||||
17 | / sp_api::impl_runtime_apis! {
|
||||
18 | | impl self::Api<Block> for Runtime {
|
||||
19 | | fn test(data: &u64) {
|
||||
20 | | unimplemented!()
|
||||
|
||||
Reference in New Issue
Block a user