Make SlashingSpans Public (#6961)

* 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
This commit is contained in:
Kian Paimani
2020-09-09 15:31:36 +02:00
committed by GitHub
parent e9982eb797
commit c07bde8bb5
+1 -1
View File
@@ -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.