Skip to content
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

Remove pallet::getter usage from all pallet-tips #4871

Merged

Conversation

Aideepakchaudhary
Copy link
Contributor

@Aideepakchaudhary Aideepakchaudhary commented Jun 24, 2024

ISSUE

Link to the issue: #3326
cc @muraca

Deliverables

  • [Deprecation] remove pallet::getter usage from all pallet-tips

Test Outcomes


Successful tests by running cargo test -p pallet-tips --features runtime-benchmarks

running 26 tests
test tests::__construct_runtime_integrity_test::runtime_integrity_tests ... ok
test benchmarking::bench_retract_tip ... ok
test tests::equal_entries_invariant ... ok
test benchmarking::bench_tip ... ok
test tests::finders_fee_invariant ... ok
test tests::genesis_config_works ... ok
test tests::genesis_funding_works ... ok
test benchmarking::bench_slash_tip ... ok
test tests::reasons_invariant ... ok
test benchmarking::bench_report_awesome ... ok
test tests::close_tip_works ... ok
test tests::report_awesome_from_beneficiary_and_tip_works ... ok
test tests::test_genesis_config_builds ... ok
test tests::test_last_reward_migration ... ok
test benchmarking::bench_tip_new ... ok
test benchmarking::bench_close_tip ... ok
test tests::test_migration_v4 ... ok
test tests::slash_tip_works ... ok
test tests::report_awesome_and_tip_works_second_instance ... ok
test tests::report_awesome_and_tip_works ... ok
test tests::tip_changing_works ... ok
test tests::zero_base_deposit_prohibited - should panic ... ok
test tests::tip_median_calculation_works ... ok
test tests::tip_new_cannot_be_used_twice ... ok
test tests::tip_large_should_fail ... ok
test tests::retract_tip_works ... ok

test result: ok. 26 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s

Doc-tests pallet_tips

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


Polkadot Address: 16htXkeVhfroBhL6nuqiwknfXKcT6WadJPZqEi2jRf9z4XPY

@Aideepakchaudhary Aideepakchaudhary requested a review from a team as a code owner June 24, 2024 17:37
@shawntabrizi
Copy link
Member

@Aideepakchaudhary for this PR to be 100% backwards compatible (for outside dependencies too), please include two new public functions which expose the storage in the same way as the getter.

For example:

impl<T: Config> Pallet<T> {
    pub fn tips(hash: T::Hash) -> Option<OpenTip...> {
        Tips::<T>::get(hash)
    }
}

prdoc/pr_4871.prdoc Show resolved Hide resolved
@bkchr bkchr enabled auto-merge July 3, 2024 18:51
@bkchr bkchr added the R0-silent Changes should not be mentioned in any release notes label Jul 3, 2024
@bkchr bkchr added this pull request to the merge queue Jul 3, 2024
Merged via the queue into paritytech:master with commit 6084923 Jul 3, 2024
157 of 161 checks passed
TomaszWaszczyk pushed a commit to TomaszWaszczyk/polkadot-sdk that referenced this pull request Jul 7, 2024
### ISSUE
Link to the issue:
paritytech#3326
cc @muraca 

Deliverables
 - [Deprecation] remove pallet::getter usage from all pallet-tips
 

### Test Outcomes
___
Successful tests by running `cargo test -p pallet-tips --features
runtime-benchmarks`



running 26 tests
test tests::__construct_runtime_integrity_test::runtime_integrity_tests
... ok
test benchmarking::bench_retract_tip ... ok
test tests::equal_entries_invariant ... ok
test benchmarking::bench_tip ... ok
test tests::finders_fee_invariant ... ok
test tests::genesis_config_works ... ok
test tests::genesis_funding_works ... ok
test benchmarking::bench_slash_tip ... ok
test tests::reasons_invariant ... ok
test benchmarking::bench_report_awesome ... ok
test tests::close_tip_works ... ok
test tests::report_awesome_from_beneficiary_and_tip_works ... ok
test tests::test_genesis_config_builds ... ok
test tests::test_last_reward_migration ... ok
test benchmarking::bench_tip_new ... ok
test benchmarking::bench_close_tip ... ok
test tests::test_migration_v4 ... ok
test tests::slash_tip_works ... ok
test tests::report_awesome_and_tip_works_second_instance ... ok
test tests::report_awesome_and_tip_works ... ok
test tests::tip_changing_works ... ok
test tests::zero_base_deposit_prohibited - should panic ... ok
test tests::tip_median_calculation_works ... ok
test tests::tip_new_cannot_be_used_twice ... ok
test tests::tip_large_should_fail ... ok
test tests::retract_tip_works ... ok

test result: ok. 26 passed; 0 failed; 0 ignored; 0 measured; 0 filtered
out; finished in 0.02s

   Doc-tests pallet_tips

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered
out; finished in 0.00s

---

Polkadot Address: 16htXkeVhfroBhL6nuqiwknfXKcT6WadJPZqEi2jRf9z4XPY

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
TarekkMA pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this pull request Aug 2, 2024
### ISSUE
Link to the issue:
paritytech#3326
cc @muraca 

Deliverables
 - [Deprecation] remove pallet::getter usage from all pallet-tips
 

### Test Outcomes
___
Successful tests by running `cargo test -p pallet-tips --features
runtime-benchmarks`



running 26 tests
test tests::__construct_runtime_integrity_test::runtime_integrity_tests
... ok
test benchmarking::bench_retract_tip ... ok
test tests::equal_entries_invariant ... ok
test benchmarking::bench_tip ... ok
test tests::finders_fee_invariant ... ok
test tests::genesis_config_works ... ok
test tests::genesis_funding_works ... ok
test benchmarking::bench_slash_tip ... ok
test tests::reasons_invariant ... ok
test benchmarking::bench_report_awesome ... ok
test tests::close_tip_works ... ok
test tests::report_awesome_from_beneficiary_and_tip_works ... ok
test tests::test_genesis_config_builds ... ok
test tests::test_last_reward_migration ... ok
test benchmarking::bench_tip_new ... ok
test benchmarking::bench_close_tip ... ok
test tests::test_migration_v4 ... ok
test tests::slash_tip_works ... ok
test tests::report_awesome_and_tip_works_second_instance ... ok
test tests::report_awesome_and_tip_works ... ok
test tests::tip_changing_works ... ok
test tests::zero_base_deposit_prohibited - should panic ... ok
test tests::tip_median_calculation_works ... ok
test tests::tip_new_cannot_be_used_twice ... ok
test tests::tip_large_should_fail ... ok
test tests::retract_tip_works ... ok

test result: ok. 26 passed; 0 failed; 0 ignored; 0 measured; 0 filtered
out; finished in 0.02s

   Doc-tests pallet_tips

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered
out; finished in 0.00s

---

Polkadot Address: 16htXkeVhfroBhL6nuqiwknfXKcT6WadJPZqEi2jRf9z4XPY

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants