mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-05 20:17:24 +00:00
Per-things trait. (#4904)
* Give perthigns the trait it always deserved.
* Make staking and phragmen work with the new generic per_thing
* Make everything work together 🔨
* a bit of cleanup
* Clean usage
* Bump.
* Fix name
* fix grumbles
* hopefully fix the ui test
* Some grumbles
* revamp traits again
* Better naming again.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
use std::collections::BTreeMap;
|
||||
use std::cmp::Reverse;
|
||||
use kvdb::{KeyValueDB, DBTransaction};
|
||||
use sp_runtime::traits::SimpleArithmetic;
|
||||
use sp_runtime::traits::AtLeast32Bit;
|
||||
use codec::{Encode, Decode};
|
||||
use sp_blockchain::{Error, Result};
|
||||
|
||||
@@ -65,7 +65,7 @@ pub struct LeafSet<H, N> {
|
||||
|
||||
impl<H, N> LeafSet<H, N> where
|
||||
H: Clone + PartialEq + Decode + Encode,
|
||||
N: std::fmt::Debug + Clone + SimpleArithmetic + Decode + Encode,
|
||||
N: std::fmt::Debug + Clone + AtLeast32Bit + Decode + Encode,
|
||||
{
|
||||
/// Construct a new, blank leaf set.
|
||||
pub fn new() -> Self {
|
||||
@@ -251,7 +251,7 @@ pub struct Undo<'a, H: 'a, N: 'a> {
|
||||
|
||||
impl<'a, H: 'a, N: 'a> Undo<'a, H, N> where
|
||||
H: Clone + PartialEq + Decode + Encode,
|
||||
N: std::fmt::Debug + Clone + SimpleArithmetic + Decode + Encode,
|
||||
N: std::fmt::Debug + Clone + AtLeast32Bit + Decode + Encode,
|
||||
{
|
||||
/// Undo an imported block by providing the displaced leaf.
|
||||
pub fn undo_import(&mut self, displaced: ImportDisplaced<H, N>) {
|
||||
|
||||
Reference in New Issue
Block a user