refactor(pallet): split impls into feature-grouped impls/ module#256
Conversation
| @@ -0,0 +1,9 @@ | |||
| pub mod agreements; | |||
There was a problem hiding this comment.
@danielbui12 please, align all file headers with all other files (Licence stuff and so on)
| use storage_primitives::{BucketId, EndAction, ProviderRole, RemovalReason, ReplayError}; | ||
|
|
||
| impl<T: Config> Pallet<T> { | ||
| pub fn validate_duration( |
There was a problem hiding this comment.
validate_duration + calculate_payment does not seem related to the agreements, but ok for now probably
There was a problem hiding this comment.
As I checked, both of them are used along with StorageAgreements
| /// then runs the same provider/capacity/stake checks as | ||
| /// `create_bucket_with_storage` before creating the bucket + primary | ||
| /// agreement. | ||
| pub fn establish_storage_agreement_internal( |
There was a problem hiding this comment.
hmm, I would put all *internal as `pub(crate)
| pub fn establish_storage_agreement_internal( | |
| pub(crate) fn establish_storage_agreement_internal( |
There was a problem hiding this comment.
I'll double check all functions.
establish_storage_agreement_internal / establish_replica_agreement_internal is used in L1 pallet
bkontur
left a comment
There was a problem hiding this comment.
@danielbui12 please, align runtime apis with implementation.md and can go in https://github.com/paritytech/web3-storage/pull/256/changes#r3511253043
Changes
Follow up #239 (comment)
Issue
RuntimeApi#237