-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
distributions: add distributions events (#5044)
## Describe your changes add LQT pool size increase event to the distributions component, emitted at the end of each block. ## Issue ticket number and link references #5041 ## Checklist before requesting a review - [x] I have added guiding text to explain how a reviewer should test these changes. - [x] If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason: > LQT branch
- Loading branch information
Showing
7 changed files
with
232 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use penumbra_sdk_num::Amount; | ||
use penumbra_sdk_proto::penumbra::core::component::distributions::v1 as pb; | ||
|
||
/// Event for when LQT pool size increases. | ||
pub fn event_lqt_pool_size_increase( | ||
epoch: u64, | ||
increase: Amount, | ||
new_total: Amount, | ||
) -> pb::EventLqtPoolSizeIncrease { | ||
pb::EventLqtPoolSizeIncrease { | ||
epoch, | ||
increase: Some(increase.into()), | ||
new_total: Some(new_total.into()), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ pub mod component; | |
pub mod genesis; | ||
pub mod params; | ||
pub use params::DistributionsParameters; | ||
pub mod event; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters