Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Sorted errors and fixed wasm build
  • Loading branch information
arkpar committed Jul 27, 2018
commit ce87d8536d2b84c3d05435ae2c1148966aa9f49a
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,7 @@ travis-ci = { repository = "paritytech/polkadot", branch = "master" }
maintenance = { status = "actively-developed" }
is-it-maintained-issue-resolution = { repository = "paritytech/polkadot" }
is-it-maintained-open-issues = { repository = "paritytech/polkadot" }

[profile.release]
# Substrate runtime requires unwinding.
panic = "unwind"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions substrate/client/src/block_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ impl<B, E, Block> BlockBuilder<B, E, Block> where
}
Some(Err(e)) => {
self.changes.discard_prospective();
Err(error::ErrorKind::Runtime(e).into())
Err(error::ErrorKind::ApplyExtinsicFailed(e).into())
}
None => {
self.changes.discard_prospective();
Err(error::ErrorKind::ApplyExtinsicFailed.into())
Err(error::ErrorKind::CallResultDecode("apply_extrinsic").into())
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions substrate/client/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ error_chain! {
display("UnknownBlock: {}", &*h),
}

/// Extrinsic error.
Runtime(e: ApplyError) {
/// Applying extrinsic error.
ApplyExtinsicFailed(e: ApplyError) {
description("Extrinsic error"),
display("Extrinsic 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.

Should we rename this to something more extrinsic-related. We could use ApplyExtinsicFailed for this IMO.

Expand Down Expand Up @@ -119,10 +119,10 @@ error_chain! {
display("Remote data fetch has been failed"),
}

/// Error decoding extrinsic outcome.
ApplyExtinsicFailed {
description("Error decoding extrinsic outcome"),
display("Error decoding extrinsic outcome."),
/// Error decoding call result.
CallResultDecode(method: &'static str) {
description("Error decoding call result")
display("Error decoding call result of {}", method)
}
}
}
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion substrate/test-runtime/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub fn execute_block(block: Block) {
assert!(header.extrinsics_root == txs_root, "Transaction trie root must be valid.");

// execute transactions
block.extrinsics.iter().for_each(|e| { execute_transaction_backend(e).expect("Extrinsic error"); });
block.extrinsics.iter().for_each(|e| { execute_transaction_backend(e).map_err(|_| ()).expect("Extrinsic error"); });

// check storage root.
let storage_root = storage_root().into();
Expand Down
Binary file not shown.
Binary file not shown.