mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 13:01:07 +00:00
Renaming and documentation for ApplyResult, ApplyOutcome and et al (#4134)
* Remove superflous errors from the system module * Rename and document InclusionOutcome * Rename InclusionError * Remove unused inclusion errors. I left the enumeration though since other elements might be used some day. * Rename and document DispatchOutcome * Apply suggestions from code review Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com> * TransactionValidityError instead of InclusionError * Rename InclusionOutcome to ApplyExtrinsicResult * Update docs. * Update lib.rs should be → is * Bump the block builder API version. * Fix the should_return_runtime_version test * Clean the evidence
This commit is contained in:
@@ -45,7 +45,7 @@ mod tests {
|
||||
traits::{CodeExecutor, Externalities}, storage::well_known_keys,
|
||||
};
|
||||
use sr_primitives::{
|
||||
Fixed64, traits::{Header as HeaderT, Hash as HashT, Convert}, ApplyResult,
|
||||
Fixed64, traits::{Header as HeaderT, Hash as HashT, Convert}, ApplyExtrinsicResult,
|
||||
transaction_validity::InvalidTransaction,
|
||||
};
|
||||
use contracts::ContractAddressFor;
|
||||
@@ -173,7 +173,7 @@ mod tests {
|
||||
true,
|
||||
None,
|
||||
).0.unwrap();
|
||||
let r = ApplyResult::decode(&mut &v.as_encoded()[..]).unwrap();
|
||||
let r = ApplyExtrinsicResult::decode(&mut &v.as_encoded()[..]).unwrap();
|
||||
assert_eq!(r, Err(InvalidTransaction::Payment.into()));
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ mod tests {
|
||||
true,
|
||||
None,
|
||||
).0.unwrap();
|
||||
let r = ApplyResult::decode(&mut &v.as_encoded()[..]).unwrap();
|
||||
let r = ApplyExtrinsicResult::decode(&mut &v.as_encoded()[..]).unwrap();
|
||||
assert_eq!(r, Err(InvalidTransaction::Payment.into()));
|
||||
}
|
||||
|
||||
@@ -854,7 +854,7 @@ mod tests {
|
||||
false,
|
||||
None,
|
||||
).0.unwrap().into_encoded();
|
||||
let r = ApplyResult::decode(&mut &r[..]).unwrap();
|
||||
let r = ApplyExtrinsicResult::decode(&mut &r[..]).unwrap();
|
||||
assert_eq!(r, Err(InvalidTransaction::Payment.into()));
|
||||
}
|
||||
|
||||
@@ -887,7 +887,7 @@ mod tests {
|
||||
false,
|
||||
None,
|
||||
).0.unwrap().into_encoded();
|
||||
ApplyResult::decode(&mut &r[..])
|
||||
ApplyExtrinsicResult::decode(&mut &r[..])
|
||||
.unwrap()
|
||||
.expect("Extrinsic could be applied")
|
||||
.expect("Extrinsic did not fail");
|
||||
|
||||
@@ -29,7 +29,7 @@ use support::{
|
||||
use primitives::u32_trait::{_1, _2, _3, _4};
|
||||
use node_primitives::{AccountId, AccountIndex, Balance, BlockNumber, Hash, Index, Moment, Signature};
|
||||
use sr_api::impl_runtime_apis;
|
||||
use sr_primitives::{Permill, Perbill, ApplyResult, impl_opaque_keys, generic, create_runtime_str};
|
||||
use sr_primitives::{Permill, Perbill, ApplyExtrinsicResult, impl_opaque_keys, generic, create_runtime_str};
|
||||
use sr_primitives::curve::PiecewiseLinear;
|
||||
use sr_primitives::transaction_validity::TransactionValidity;
|
||||
use sr_primitives::traits::{
|
||||
@@ -584,7 +584,7 @@ impl_runtime_apis! {
|
||||
}
|
||||
|
||||
impl block_builder_api::BlockBuilder<Block> for Runtime {
|
||||
fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyResult {
|
||||
fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
|
||||
Executive::apply_extrinsic(extrinsic)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user