Change submit transaction spec_version and transaction_version query from chain (#1248)

* The `spec_version` and `transaction_version` query from chain

* fix compile

* Lint

* Custom spec_version and transaction_version

* runtime version params struct opt

* runtime version cli

* cli params

* Add missing types defined

* fix compile

* debug cli

* clippy

* clippy

* Query spec_version and transaction_version same times

* Fix vars

* Wrap option

* Wrap option

* Try fix ci

* Change follow suggestions
This commit is contained in:
fewensa
2021-12-16 20:55:01 +08:00
committed by Bastian Köcher
parent ecd7687701
commit 3aff81a707
29 changed files with 600 additions and 274 deletions
+11 -4
View File
@@ -32,10 +32,10 @@ use std::time::Duration;
pub use crate::{
chain::{
AccountKeyPairOf, BlockWithJustification, CallOf, Chain, ChainWithBalances,
ChainWithMessages, TransactionSignScheme, TransactionStatusOf, UnsignedTransaction,
WeightToFeeOf,
ChainWithMessages, SignParam, TransactionSignScheme, TransactionStatusOf,
UnsignedTransaction, WeightToFeeOf,
},
client::{Client, OpaqueGrandpaAuthoritiesSet, Subscription},
client::{ChainRuntimeVersion, Client, OpaqueGrandpaAuthoritiesSet, Subscription},
error::{Error, Result},
sync_header::SyncHeader,
};
@@ -56,11 +56,18 @@ pub struct ConnectionParams {
pub port: u16,
/// Use secure websocket connection.
pub secure: bool,
/// Defined chain runtime version
pub chain_runtime_version: ChainRuntimeVersion,
}
impl Default for ConnectionParams {
fn default() -> Self {
ConnectionParams { host: "localhost".into(), port: 9944, secure: false }
ConnectionParams {
host: "localhost".into(),
port: 9944,
secure: false,
chain_runtime_version: ChainRuntimeVersion::Auto,
}
}
}