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

Check for pruned block state #648

Merged
merged 1 commit into from
Sep 3, 2018
Merged

Check for pruned block state #648

merged 1 commit into from
Sep 3, 2018

Conversation

arkpar
Copy link
Member

@arkpar arkpar commented Sep 3, 2018

Also fixed an issue that prevented block 0 from being pruned.

@arkpar arkpar added the A0-please_review Pull request needs code review. label Sep 3, 2018
}).ok_or_else(|| client::error::ErrorKind::UnknownBlock(format!("{:?}", block)).into()))
match self.blockchain.header(block) {
Ok(Some(ref hdr)) if !self.storage.state_db.is_pruned(hdr.number().as_()) => {
let root: H256 = H256::from_slice(hdr.state_root().as_ref());
Copy link
Member

Choose a reason for hiding this comment

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

double-space

@svyatonik svyatonik added A8-looksgood and removed A0-please_review Pull request needs code review. labels Sep 3, 2018
@gavofyork gavofyork merged commit afe8936 into master Sep 3, 2018
@gavofyork gavofyork deleted the a-state-check branch September 3, 2018 14:29
dvdplm added a commit that referenced this pull request Sep 4, 2018
* master: (22 commits)
  Introduce treasury and document (#646)
  Off-the-table staking preference (#656)
  Implement function `json_metadata` in `decl_module!` (#654)
  Fix warnings in networking (#652)
  Add a reputation system (#645)
  Check for pruned block state (#648)
  Contract runtime polishing (#601)
  WIP on chain heap (#639)
  Events to track extrinsic success (#640)
  Install llvm-tools-preview component (#643)
  fix wasm executor compile error (#631)
  random fixes (#638)
  Empty becomes (), reflecting convention (#637)
  Allow to build_upon skipped entries, but don't walk back (#635)
  Separate out staking module into balances and payment (#629)
  Update .gitlab-ci.yml (#633)
  Do not attempt to rustup if in CI. This is taken care of by the base (#621)
  Avoid need for ident strings in storage (#624)
  rename to panic_handler as panic_implementation is deprecated in nightly (#626)
  5 random fixes (#2) (#623)
  ...
dvdplm added a commit that referenced this pull request Sep 5, 2018
…and-rlpcodec

* master:
  Upgrade to libp2p master (#660)
  Include function comments into modules `json_metadata` (#657)
  Replace old headers with CHT in light clients (#512)
  Fix build
  Introduce treasury and document (#646)
  Off-the-table staking preference (#656)
  Implement function `json_metadata` in `decl_module!` (#654)
  Fix warnings in networking (#652)
  Add a reputation system (#645)
  Check for pruned block state (#648)
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.

None yet

3 participants