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

Commit

Permalink
Emit Bonded event when rebonding (#9040)
Browse files Browse the repository at this point in the history
* 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 <admin@parity.io>
  • Loading branch information
shawntabrizi and Parity Bot authored Jun 8, 2021
1 parent 0a2472d commit 07a1af3
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 109 deletions.
1 change: 1 addition & 0 deletions frame/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1820,6 +1820,7 @@ decl_module! {
// last check: the new active amount of ledger must be more than ED.
ensure!(ledger.active >= T::Currency::minimum_balance(), Error::<T>::InsufficientValue);

Self::deposit_event(RawEvent::Bonded(ledger.stash.clone(), value));
Self::update_ledger(&controller, &ledger);
Ok(Some(
35 * WEIGHT_PER_MICROS
Expand Down
Loading

0 comments on commit 07a1af3

Please sign in to comment.