Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

More generic extrinsic pool #579

Merged
merged 1 commit into from
Aug 20, 2018
Merged

More generic extrinsic pool #579

merged 1 commit into from
Aug 20, 2018

Conversation

arkpar
Copy link
Member

@arkpar arkpar commented Aug 16, 2018

  • Moved most of the common logic from polkadot transaction pool to substrate.
  • Extrinsic hash type can now be different from the block hash type.

@arkpar arkpar added the A0-please_review Pull request needs code review. label Aug 16, 2018
@arkpar arkpar requested a review from tomusdrw August 16, 2018 15:54
Copy link
Contributor

@pepyakin pepyakin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some nits regarding style and formatting

"chain" => chain_name.clone(),
"pubkey" => &pubkey,
);
"name" => name.clone(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there are some spaces sneaked in.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this was indentend anyway?

Err(e) => match e.into_pool_error() {
Ok(e) => match e.kind() {
extrinsic_pool::ErrorKind::AlreadyImported(hash) =>
Some(::std::str::FromStr::from_str(&hash).map_err(|_| {}).expect("Hash string is always valid")),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we wrap this line ?

},
},
Err(e) => {
debug!("Error converting pool error: {:?}", e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation looks a bit off here

state,
chain,
author,
rpc_config.clone(),
)
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inconsistent indentation

type Extrinsic = u64;
type Hash = u64;
#[derive(Clone, Debug)]
pub struct Verified(u64, u64); // sender, nonce
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be more readable if it were a normal struct instead of a tuple?

@arkpar arkpar force-pushed the a-ex-pool-refactor branch 2 times, most recently from 7be70d2 to 24ddf08 Compare August 16, 2018 16:34
@gavofyork gavofyork added A8-looksgood and removed A0-please_review Pull request needs code review. labels Aug 20, 2018
@gavofyork
Copy link
Member

looks reasonable.

@gavofyork gavofyork merged commit fa1392a into master Aug 20, 2018
@gavofyork gavofyork deleted the a-ex-pool-refactor branch August 20, 2018 12:54
dvdplm added a commit that referenced this pull request Aug 27, 2018
…and-rlpcodec

* master:
  More generic extrinsic pool (#579)
liuchengxu added a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
* Update wasm build step

* Update pre_release ci

* Minimize change

Co-authored-by: alannotnerd <alan1995wang@outlook.com>
helin6 pushed a commit to boolnetwork/substrate that referenced this pull request Jul 25, 2023
* cli: Support ws or wss connection via jsonrpsee

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* cli: Handle `http` connections via `ureq`

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* cli: Use Jsonrpsee HTTP client

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* cli: Remove `node.to_string()` calls

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants