Skip to content

Commit

Permalink
Updated weights for the removed events.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdcosta committed Jan 21, 2023
1 parent a350f89 commit 84bfc2b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
12 changes: 6 additions & 6 deletions pallets/accounting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,12 @@ mod pallet {
PostingNumber::<T>::put(posting_index);
PostingDetail::<T>::insert(&balance_key, &posting_index, detail);

Self::deposit_event(Event::LegderUpdate(
key.primary_party,
key.ledger,
key.amount,
posting_index,
));
// Self::deposit_event(Event::LegderUpdate(
// key.primary_party,
// key.ledger,
// key.amount,
// posting_index,
// ));

Ok(())
}
Expand Down
33 changes: 16 additions & 17 deletions pallets/balances/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Accounting GlobalLedger (r:2 w:2)
// Storage: Accounting PostingDetail (r:0 w:4)
fn transfer() -> Weight {
// Minimum execution time: 522_320 nanoseconds.
Weight::from_ref_time(531_003_000 as u64)
// Minimum execution time: 401_222 nanoseconds.
Weight::from_ref_time(449_802_000 as u64)
.saturating_add(T::DbWeight::get().reads(11 as u64))
.saturating_add(T::DbWeight::get().writes(12 as u64))
}
Expand All @@ -80,22 +80,22 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Accounting GlobalLedger (r:2 w:2)
// Storage: Accounting PostingDetail (r:0 w:4)
fn transfer_keep_alive() -> Weight {
// Minimum execution time: 480_735 nanoseconds.
Weight::from_ref_time(500_857_000 as u64)
// Minimum execution time: 259_060 nanoseconds.
Weight::from_ref_time(417_939_000 as u64)
.saturating_add(T::DbWeight::get().reads(11 as u64))
.saturating_add(T::DbWeight::get().writes(12 as u64))
}
// Storage: System Account (r:1 w:1)
fn set_balance_creating() -> Weight {
// Minimum execution time: 93_022 nanoseconds.
Weight::from_ref_time(96_866_000 as u64)
// Minimum execution time: 93_120 nanoseconds.
Weight::from_ref_time(97_804_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: System Account (r:1 w:1)
fn set_balance_killing() -> Weight {
// Minimum execution time: 99_443 nanoseconds.
Weight::from_ref_time(113_790_000 as u64)
// Minimum execution time: 109_070 nanoseconds.
Weight::from_ref_time(113_298_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
Expand All @@ -108,8 +108,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Accounting GlobalLedger (r:2 w:2)
// Storage: Accounting PostingDetail (r:0 w:4)
fn force_transfer() -> Weight {
// Minimum execution time: 505_164 nanoseconds.
Weight::from_ref_time(533_209_000 as u64)
// Minimum execution time: 424_742 nanoseconds.
Weight::from_ref_time(446_402_000 as u64)
.saturating_add(T::DbWeight::get().reads(12 as u64))
.saturating_add(T::DbWeight::get().writes(13 as u64))
}
Expand All @@ -122,8 +122,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Accounting GlobalLedger (r:2 w:2)
// Storage: Accounting PostingDetail (r:0 w:4)
fn transfer_all() -> Weight {
// Minimum execution time: 516_312 nanoseconds.
Weight::from_ref_time(546_326_000 as u64)
// Minimum execution time: 418_174 nanoseconds.
Weight::from_ref_time(454_420_000 as u64)
.saturating_add(T::DbWeight::get().reads(11 as u64))
.saturating_add(T::DbWeight::get().writes(12 as u64))
}
Expand All @@ -136,10 +136,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Accounting GlobalLedger (r:2 w:2)
// Storage: Accounting PostingDetail (r:0 w:2)
fn force_unreserve() -> Weight {
// Minimum execution time: 63_000 nanoseconds.
// Minimum execution time: 287_973 nanoseconds.
Weight::from_ref_time(299_070_000 as u64)
.saturating_add(T::DbWeight::get().reads(9 as u64))
.saturating_add(T::DbWeight::get().writes(8 as u64))
// Minimum execution time: 247_109 nanoseconds.
Weight::from_ref_time(262_610_000 as u64)
.saturating_add(T::DbWeight::get().reads(9 as u64))
.saturating_add(T::DbWeight::get().writes(8 as u64))
}
}

0 comments on commit 84bfc2b

Please sign in to comment.