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
Show all changes
37 commits
Select commit Hold shift + click to select a range
eb6c135
Apply some clippy hints
hirschenberger Mar 30, 2022
e55308a
Merge remote-tracking branch 'origin/master' into issue_11054
hirschenberger Apr 2, 2022
0399809
Revert clippy ci changes
hirschenberger Apr 2, 2022
beca8c8
Update client/cli/src/commands/generate.rs
hirschenberger Apr 2, 2022
2e28e4e
Update client/cli/src/commands/inspect_key.rs
hirschenberger Apr 2, 2022
a14e027
Update client/db/src/bench.rs
hirschenberger Apr 2, 2022
1a0b11d
Update client/db/src/bench.rs
hirschenberger Apr 2, 2022
e072cf3
Update client/service/src/client/block_rules.rs
hirschenberger Apr 2, 2022
3f22750
Update client/service/src/client/block_rules.rs
hirschenberger Apr 2, 2022
8892ce0
Update client/network/src/transactions.rs
hirschenberger Apr 2, 2022
0ded163
Update client/network/src/protocol.rs
hirschenberger Apr 2, 2022
3314718
Revert due to missing `or_default` function.
hirschenberger Apr 3, 2022
492f365
Fix compilation and simplify code
hirschenberger Apr 4, 2022
818b944
Merge remote-tracking branch 'origin/master' into issue_11054
hirschenberger Apr 4, 2022
6773d75
Merge remote-tracking branch 'origin/master' into issue_11054
hirschenberger Apr 14, 2022
442faa2
Merge branch 'master' into issue_11054
gilescope Apr 14, 2022
940670f
Undo change that corrupts benchmark.
hirschenberger Apr 14, 2022
68198ad
Merge branch 'issue_11054' of github.com:hirschenberger/substrate int…
hirschenberger Apr 14, 2022
6c34998
fix clippy
gilescope Apr 14, 2022
8614818
Update client/service/test/src/lib.rs
gilescope Apr 14, 2022
1825c3b
Update client/state-db/src/noncanonical.rs
gilescope Apr 14, 2022
2233f3b
Update client/state-db/src/noncanonical.rs
gilescope Apr 14, 2022
d0b24e3
Update client/tracing/src/logging/directives.rs
gilescope Apr 14, 2022
4270ba1
Update utils/fork-tree/src/lib.rs
gilescope Apr 14, 2022
a1213d0
added needed ref
gilescope Apr 14, 2022
c3cd70f
Update frame/referenda/src/benchmarking.rs
gilescope Apr 14, 2022
0d4d583
Simplify byte-vec creation
hirschenberger Apr 15, 2022
4fd769a
let's just not overlap the ranges
gilescope Apr 20, 2022
24bc48c
Correction
gilescope Apr 20, 2022
635fb92
Merge remote-tracking branch 'upstream/master' into issue_11054
gilescope Apr 22, 2022
ac98fb8
Merge remote-tracking branch 'upstream/master' into issue_11054
gilescope Apr 25, 2022
91abc4c
Merge remote-tracking branch 'upstream/master' into issue_11054
gilescope Apr 27, 2022
d530cce
cargo fmt
gilescope Apr 27, 2022
1297c1f
Update utils/frame/benchmarking-cli/src/shared/stats.rs
hirschenberger Apr 30, 2022
2a007df
Update utils/frame/benchmarking-cli/src/pallet/command.rs
hirschenberger Apr 30, 2022
c3d82dd
Update utils/frame/benchmarking-cli/src/pallet/command.rs
hirschenberger Apr 30, 2022
59a81ff
Merge remote-tracking branch 'origin/master' into issue_11054
hirschenberger Apr 30, 2022
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
Merge remote-tracking branch 'upstream/master' into issue_11054
  • Loading branch information
gilescope committed Apr 27, 2022
commit 91abc4c6cee2f0c48cf97459ea306f7e2a9fa35d
4 changes: 2 additions & 2 deletions client/executor/wasmi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl Sandbox for FunctionExecutor {
};

if self.memory.set(buf_ptr.into(), &buffer).is_err() {
return Ok(sandbox_primitives::ERR_OUT_OF_BOUNDS)
return Ok(sandbox_env::ERR_OUT_OF_BOUNDS)
}

Ok(sandbox_env::ERR_OK)
Expand All @@ -186,7 +186,7 @@ impl Sandbox for FunctionExecutor {
};

if sandboxed_memory.write_from(Pointer::new(offset as u32), &buffer).is_err() {
return Ok(sandbox_primitives::ERR_OUT_OF_BOUNDS)
return Ok(sandbox_env::ERR_OUT_OF_BOUNDS);
}

Ok(sandbox_env::ERR_OK)
Expand Down
4 changes: 2 additions & 2 deletions client/executor/wasmtime/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ impl<'a> Sandbox for HostContext<'a> {

let instance_idx_or_err_code = match result {
Ok(instance) => instance.register(self.sandbox_store_mut(), dispatch_thunk),
Err(sandbox::InstantiationError::StartTrapped) => sandbox_primitives::ERR_EXECUTION,
Err(_) => sandbox_primitives::ERR_MODULE,
Err(sandbox::InstantiationError::StartTrapped) => sandbox_env::ERR_EXECUTION,
Err(_) => sandbox_env::ERR_MODULE,
};

Ok(instance_idx_or_err_code as u32)
Expand Down
2 changes: 1 addition & 1 deletion frame/assets/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
(true, Some(dust)) => (amount, Some(dust)),
_ => (debit, None),
};
Self::can_increase(id, dest, credit).into_result()?;
Self::can_increase(id, dest, credit, false).into_result()?;
Ok((credit, maybe_burn))
}

Expand Down
2 changes: 1 addition & 1 deletion frame/balances/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ impl<T: Config<I>, I: 'static> fungible::Mutate<T::AccountId> for Pallet<T, I> {
return Ok(())
}
Self::try_mutate_account(who, |account, _is_new| -> DispatchResult {
Self::deposit_consequence(who, amount, account).into_result()?;
Self::deposit_consequence(who, amount, account, true).into_result()?;
account.free += amount;
Ok(())
})?;
Expand Down
6 changes: 4 additions & 2 deletions frame/support/src/traits/tokens/fungible.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ pub trait Mutate<AccountId>: Inspect<AccountId> {
dest: &AccountId,
amount: Self::Balance,
) -> Result<Self::Balance, DispatchError> {
let extra = Self::can_withdraw(source, amount).into_result()?;
Self::can_deposit(dest, amount.saturating_add(extra)).into_result()?;
let extra = Self::can_withdraw(&source, amount).into_result()?;
// As we first burn and then mint, we don't need to check if `mint` fits into the supply.
// If we can withdraw/burn it, we can also mint it again.
Self::can_deposit(dest, amount.saturating_add(extra), false).into_result()?;
let actual = Self::burn_from(source, amount)?;
debug_assert!(
actual == amount.saturating_add(extra),
Expand Down
6 changes: 4 additions & 2 deletions frame/support/src/traits/tokens/fungibles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ pub trait Mutate<AccountId>: Inspect<AccountId> {
dest: &AccountId,
amount: Self::Balance,
) -> Result<Self::Balance, DispatchError> {
let extra = Self::can_withdraw(asset, source, amount).into_result()?;
Self::can_deposit(asset, dest, amount.saturating_add(extra)).into_result()?;
let extra = Self::can_withdraw(asset, &source, amount).into_result()?;
// As we first burn and then mint, we don't need to check if `mint` fits into the supply.
// If we can withdraw/burn it, we can also mint it again.
Self::can_deposit(asset, dest, amount.saturating_add(extra), false).into_result()?;
let actual = Self::burn_from(asset, source, amount)?;
debug_assert!(
actual == amount.saturating_add(extra),
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.