WeightInfo for Vesting Pallet (#7103)

* WeightInfo for Vesting Pallet

* clean up weight docs

* Update lib.rs

* try to pipe max locks

* Update for new type

* add warning when locks > MaxLocks

* Update lib.rs

* fix compile

* remove aliasing, fix trait def

* Update
This commit is contained in:
Shawn Tabrizi
2020-09-16 21:48:10 +02:00
committed by GitHub
parent 0a6f7b08d7
commit 9aa8698cfc
37 changed files with 273 additions and 71 deletions
+5 -1
View File
@@ -325,9 +325,13 @@ impl pallet_indices::Trait for Runtime {
parameter_types! {
pub const ExistentialDeposit: Balance = 1 * DOLLARS;
// For weight estimation, we assume that the most locks on an individual account will be 50.
// This number may need to be adjusted in the future if this assumption no longer holds true.
pub const MaxLocks: u32 = 50;
}
impl pallet_balances::Trait for Runtime {
type MaxLocks = MaxLocks;
type Balance = Balance;
type DustRemoval = ();
type Event = Event;
@@ -856,7 +860,7 @@ impl pallet_vesting::Trait for Runtime {
type Currency = Balances;
type BlockNumberToBalance = ConvertInto;
type MinVestedTransfer = MinVestedTransfer;
type WeightInfo = ();
type WeightInfo = weights::pallet_vesting::WeightInfo;
}
construct_runtime!(