diff --git a/polkadot/cli/src/lib.rs b/polkadot/cli/src/lib.rs index 2552e36b42..1810922c7b 100644 --- a/polkadot/cli/src/lib.rs +++ b/polkadot/cli/src/lib.rs @@ -115,7 +115,7 @@ fn load_spec(matches: &clap::ArgMatches) -> Result<(service::ChainSpec, bool), S .map(ChainSpec::from) .unwrap_or_else(|| if matches.is_present("dev") { ChainSpec::Development } else { ChainSpec::KrummeLanke }); let is_global = match chain_spec { - ChainSpec::KrummeLanke | ChainSpec::StagingTestnet => true, + ChainSpec::KrummeLanke => true, _ => false, }; let spec = chain_spec.load()?; diff --git a/polkadot/transaction-pool/src/lib.rs b/polkadot/transaction-pool/src/lib.rs index 6d64d39e8d..265f72ba99 100644 --- a/polkadot/transaction-pool/src/lib.rs +++ b/polkadot/transaction-pool/src/lib.rs @@ -18,7 +18,7 @@ extern crate ed25519; extern crate substrate_client as client; extern crate substrate_codec as codec; extern crate substrate_extrinsic_pool as extrinsic_pool; -extern crate substrate_primitives as substrate_primitives; +extern crate substrate_primitives; extern crate substrate_runtime_primitives; extern crate polkadot_runtime as runtime; extern crate polkadot_primitives as primitives; @@ -279,13 +279,16 @@ impl<'a, A> txpool::Verifier for Verifier<'a, A> where type Error = Error; fn verify_transaction(&self, uxt: UncheckedExtrinsic) -> Result { - info!("Extrinsic Submitted: {:?}", uxt); if !uxt.is_signed() { bail!(ErrorKind::IsInherent(uxt)) } - let (encoded_size, hash) = uxt.using_encoded(|e| (e.len(), BlakeTwo256::hash(e))); + let encoded = uxt.encode(); + let (encoded_size, hash) = (encoded.len(), BlakeTwo256::hash(&encoded)); + + debug!(target: "transaction-pool", "Transaction submitted: {}", ::substrate_primitives::hexdisplay::HexDisplay::from(&encoded)); + let inner = match uxt.clone().check_with(|a| self.lookup(a)) { Ok(xt) => Some(xt), // keep the transaction around in the future pool and attempt to promote it later. @@ -294,6 +297,12 @@ impl<'a, A> txpool::Verifier for Verifier<'a, A> where }; let sender = inner.as_ref().map(|x| x.signed.clone()); + if encoded_size < 1024 { + info!(target: "transaction-pool", "Transaction verified: {} => {:?}", hash, uxt); + } else { + info!(target: "transaction-pool", "Transaction verified: {} ({} bytes is too large to display)", hash, encoded_size); + } + Ok(VerifiedTransaction { original: uxt, inner,