Skip to content
This repository was archived by the owner on May 22, 2023. It is now read-only.

Commit 87c3ffb

Browse files
shawntabriziParity Bot
authored andcommitted
Emit Bonded event when rebonding (paritytech#9040)
* Emit `Bonded` event when rebonding * fix borrow checker * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs Co-authored-by: Parity Bot <[email protected]>
1 parent 5069ca0 commit 87c3ffb

File tree

2 files changed

+110
-109
lines changed

2 files changed

+110
-109
lines changed

frame/staking/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,6 +1820,7 @@ decl_module! {
18201820
// last check: the new active amount of ledger must be more than ED.
18211821
ensure!(ledger.active >= T::Currency::minimum_balance(), Error::<T>::InsufficientValue);
18221822

1823+
Self::deposit_event(RawEvent::Bonded(ledger.stash.clone(), value));
18231824
Self::update_ledger(&controller, &ledger);
18241825
Ok(Some(
18251826
35 * WEIGHT_PER_MICROS

0 commit comments

Comments
 (0)