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

Commit

Permalink
Make SlashingSpans Public (#6961)
Browse files Browse the repository at this point in the history
* Make SlashingSpans Public

Offchain Applications will often need to inspect this type because it is directly used in staking election, thus worthy of being `pub`. Rest of the slashing api can remain private, only this and the `fn last_non_zero_slash()` of `SlashingSpans` are of interest.

* Update frame/staking/src/lib.rs
  • Loading branch information
kianenigma authored and bkchr committed Sep 18, 2020
1 parent 29b42c3 commit 384f29f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frame/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ decl_storage! {
=> Option<BalanceOf<T>>;

/// Slashing spans for stash accounts.
SlashingSpans: map hasher(twox_64_concat) T::AccountId => Option<slashing::SlashingSpans>;
SlashingSpans get(fn slashing_spans): map hasher(twox_64_concat) T::AccountId => Option<slashing::SlashingSpans>;

/// Records information about the maximum slash of a stash within a slashing span,
/// as well as how much reward has been paid out.
Expand Down

0 comments on commit 384f29f

Please sign in to comment.