-
Notifications
You must be signed in to change notification settings - Fork 300
support multi currency rewards #601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #601 +/- ##
==========================================
+ Coverage 75.58% 76.51% +0.92%
==========================================
Files 76 77 +1
Lines 5955 6246 +291
==========================================
+ Hits 4501 4779 +278
- Misses 1454 1467 +13
Continue to review full report at Codecov.
|
rewards/src/lib.rs
Outdated
/// The Reward Pool Info. | ||
#[derive(Clone, Encode, Decode, PartialEq, Eq, RuntimeDebug, Default, MaxEncodedLen)] | ||
pub struct PoolInfo<Share: HasCompact, Balance: HasCompact> { | ||
pub struct PoolInfoV0<Share: HasCompact, Balance: HasCompact> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can move this to migration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
rewards/src/lib.rs
Outdated
fmt::Debug, | ||
vec::Vec, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should have prelude::*
which includes vec and few others
rewards/src/lib.rs
Outdated
} | ||
Pools::<T>::mutate_exists(pool, |maybe_pool_info| { | ||
Pools::<T>::mutate_exists(pool, |maybe_pool_info| -> DispatchResult { | ||
ensure!(maybe_pool_info.is_some(), Error::<T>::PoolDoesNotExist); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let pool_info = maybe_pool_info.ok_or(Error::<T>::PoolDoesNotExist)?;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let pool_info = maybe_pool_info.ok_or(Error::::PoolDoesNotExist)?;
missed that 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have some pre_migrate & post_migrate to allow us to verify state with try-runtime
rewards/src/migrations.rs
Outdated
T::DbWeight::get().reads_writes(reads_writes, reads_writes) | ||
} | ||
|
||
// #[test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happen to this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
triggered by migrate process of module-incentives
No description provided.