mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-14 07:25:41 +00:00
Contract restoration (#2502)
* partial impl * more checks * improve TestExternalities + tests * make tombstone raw to derive Eq * remove before merge * add test * fmt * update test * doc * bump version * fix testing * update runtime * Fix TrieIdGenerator * fix dummy trie id generator * update test * bump version * format * Update core/state-machine/src/testing.rs Co-Authored-By: cheme <emericchevalier.pro@gmail.com> * document test * Apply suggestions from code review Co-Authored-By: DemiMarie-temp <50585338+DemiMarie-temp@users.noreply.github.com> * refactor * fix * fmt * address review * impl last_write * Fix storage size, test, remove size in tombstone * fix * Update srml/contract/src/lib.rs Co-Authored-By: Sergei Pepyakin <s.pepyakin@gmail.com> * comment * child_storage_root as &[u8]
This commit is contained in:
committed by
Sergei Pepyakin
parent
c357854015
commit
ffce18b994
@@ -163,9 +163,8 @@ fn try_evict_or_and_pay_rent<T: Trait>(
|
||||
// Note: this operation is heavy.
|
||||
let child_storage_root = runtime_io::child_storage_root(&contract.trie_id);
|
||||
|
||||
let tombstone = TombstoneContractInfo::new(
|
||||
child_storage_root,
|
||||
contract.storage_size,
|
||||
let tombstone = <TombstoneContractInfo<T>>::new(
|
||||
&child_storage_root[..],
|
||||
contract.code_hash,
|
||||
);
|
||||
<ContractInfoOf<T>>::insert(account, ContractInfo::Tombstone(tombstone));
|
||||
|
||||
Reference in New Issue
Block a user