Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
d2411a26
Commit
d2411a26
authored
1 year ago
by
PG Herveou
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Contracts Rollback StorageMap hashing migration (#14661)
* Contracts Rollback StorageMap hashing migration * misc v13
parent
c533005d
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
substrate/frame/contracts/src/lib.rs
+2
-2
2 additions, 2 deletions
substrate/frame/contracts/src/lib.rs
substrate/frame/contracts/src/migration/v13.rs
+1
-2
1 addition, 2 deletions
substrate/frame/contracts/src/migration/v13.rs
with
3 additions
and
4 deletions
substrate/frame/contracts/src/lib.rs
+
2
−
2
View file @
d2411a26
...
...
@@ -187,7 +187,7 @@ pub mod pallet {
/// The current storage version.
#[cfg(not(any(test,
feature
=
"runtime-benchmarks"
)))]
const
STORAGE_VERSION
:
StorageVersion
=
StorageVersion
::
new
(
1
2
);
const
STORAGE_VERSION
:
StorageVersion
=
StorageVersion
::
new
(
1
3
);
/// Hard coded storage version for running tests that depend on the current storage version.
#[cfg(any(test,
feature
=
"runtime-benchmarks"
))]
...
...
@@ -1022,7 +1022,7 @@ pub mod pallet {
/// TWOX-NOTE: SAFE since `AccountId` is a secure hash.
#[pallet::storage]
pub
(
crate
)
type
ContractInfoOf
<
T
:
Config
>
=
StorageMap
<
_
,
Identity
,
T
::
AccountId
,
ContractInfo
<
T
>>
;
StorageMap
<
_
,
Twox64Concat
,
T
::
AccountId
,
ContractInfo
<
T
>>
;
/// Evicted contracts that await child trie deletion.
///
...
...
This diff is collapsed.
Click to expand it.
substrate/frame/contracts/src/migration/v13.rs
+
1
−
2
View file @
d2411a26
...
...
@@ -16,7 +16,6 @@
// limitations under the License.
//! Add `delegate_dependencies` to `ContractInfo`.
//! Use `Identity` instead of `Twox64Concat` for hashing keys of the `ContractInfoOf` storage map
//! See <https://github.com/paritytech/substrate/pull/14079>.
use
crate
::{
...
...
@@ -74,7 +73,7 @@ pub fn store_old_contract_info<T: Config>(account: T::AccountId, info: crate::Co
#[storage_alias]
pub
type
ContractInfoOf
<
T
:
Config
>
=
StorageMap
<
Pallet
<
T
>
,
Identity
,
<
T
as
frame_system
::
Config
>
::
AccountId
,
ContractInfo
<
T
>>
;
StorageMap
<
Pallet
<
T
>
,
Twox64Concat
,
<
T
as
frame_system
::
Config
>
::
AccountId
,
ContractInfo
<
T
>>
;
#[derive(Encode,
Decode,
CloneNoBound,
PartialEq,
Eq,
RuntimeDebug,
TypeInfo,
MaxEncodedLen)]
#[scale_info(skip_type_params(T))]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment