Skip to content

Commit

Permalink
fix: 🎨 implement fixes to PR + run typegen (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
TDemeco authored Jan 8, 2025
1 parent d6123c3 commit 355612f
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ runtimes/
.env
*.tmp
**/tmp/
res/benchmarking

.DS_Store
.vscode/
Expand Down
3 changes: 1 addition & 2 deletions api-augment/dist/interfaces/lookup.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api-augment/dist/interfaces/lookup.js.map

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions api-augment/dist/types/interfaces/augment-api-errors.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,6 @@ declare module "@polkadot/api-base/types/errors" {
* Number of removed BSPs volunteered from storage request prefix did not match the expected number.
**/
UnexpectedNumberOfRemovedVolunteeredBsps: AugmentedError<ApiType>;
/**
* Used Capacity value should be 0.
**/
UsedCapacityShouldBeZero: AugmentedError<ApiType>;
/**
* A SP tried to stop storing files from a user that was supposedly insolvent, but the user is not insolvent.
**/
Expand Down
4 changes: 1 addition & 3 deletions api-augment/dist/types/interfaces/types-lookup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5457,7 +5457,6 @@ declare module "@polkadot/types/lookup" {
readonly isRootNotUpdated: boolean;
readonly isNoPrivacyChange: boolean;
readonly isOperationNotAllowedForInsolventProvider: boolean;
readonly isUsedCapacityShouldBeZero: boolean;
readonly type:
| "StorageRequestAlreadyRegistered"
| "StorageRequestNotFound"
Expand Down Expand Up @@ -5532,8 +5531,7 @@ declare module "@polkadot/types/lookup" {
| "NoFileKeysToConfirm"
| "RootNotUpdated"
| "NoPrivacyChange"
| "OperationNotAllowedForInsolventProvider"
| "UsedCapacityShouldBeZero";
| "OperationNotAllowedForInsolventProvider";
}
/** @name PalletProofsDealerProofSubmissionRecord (467) */
interface PalletProofsDealerProofSubmissionRecord extends Struct {
Expand Down
4 changes: 0 additions & 4 deletions api-augment/src/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,6 @@ declare module "@polkadot/api-base/types/errors" {
* Number of removed BSPs volunteered from storage request prefix did not match the expected number.
**/
UnexpectedNumberOfRemovedVolunteeredBsps: AugmentedError<ApiType>;
/**
* Used Capacity value should be 0.
**/
UsedCapacityShouldBeZero: AugmentedError<ApiType>;
/**
* A SP tried to stop storing files from a user that was supposedly insolvent, but the user is not insolvent.
**/
Expand Down
3 changes: 1 addition & 2 deletions api-augment/src/interfaces/lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4541,8 +4541,7 @@ export default {
"NoFileKeysToConfirm",
"RootNotUpdated",
"NoPrivacyChange",
"OperationNotAllowedForInsolventProvider",
"UsedCapacityShouldBeZero"
"OperationNotAllowedForInsolventProvider"
]
},
/**
Expand Down
4 changes: 1 addition & 3 deletions api-augment/src/interfaces/types-lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5724,7 +5724,6 @@ declare module "@polkadot/types/lookup" {
readonly isRootNotUpdated: boolean;
readonly isNoPrivacyChange: boolean;
readonly isOperationNotAllowedForInsolventProvider: boolean;
readonly isUsedCapacityShouldBeZero: boolean;
readonly type:
| "StorageRequestAlreadyRegistered"
| "StorageRequestNotFound"
Expand Down Expand Up @@ -5799,8 +5798,7 @@ declare module "@polkadot/types/lookup" {
| "NoFileKeysToConfirm"
| "RootNotUpdated"
| "NoPrivacyChange"
| "OperationNotAllowedForInsolventProvider"
| "UsedCapacityShouldBeZero";
| "OperationNotAllowedForInsolventProvider";
}

/** @name PalletProofsDealerProofSubmissionRecord (467) */
Expand Down
2 changes: 1 addition & 1 deletion api-augment/storagehub.json

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions pallets/file-system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -826,8 +826,6 @@ pub mod pallet {
NoPrivacyChange,
/// Operations not allowed for insolvent provider
OperationNotAllowedForInsolventProvider,
/// Used Capacity value should be 0.
UsedCapacityShouldBeZero,
}

/// This enum holds the HoldReasons for this pallet, allowing the runtime to identify each held balance with different reasons separately
Expand Down
3 changes: 2 additions & 1 deletion pallets/file-system/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1800,8 +1800,9 @@ where
});
}

// We should remove the BSP from the dealer proof
// Stop the BSP's challenge and randomness cycles.
<T::ProofDealer as shp_traits::ProofsDealerInterface>::stop_challenge_cycle(&bsp_id)?;
<T::CrRandomness as CommitRevealRandomnessInterface>::stop_randomness_cycle(&bsp_id)?;
};

Ok((bsp_id, new_root))
Expand Down

0 comments on commit 355612f

Please sign in to comment.