mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 19:21:13 +00:00
Use storage::append in the implementation of the storage types (#5889)
* Start improving `storage_append` * Fix some stuff * Fix compilation * Update docs and add new test * More tests * Test kill + append
This commit is contained in:
@@ -168,7 +168,7 @@ use sp_runtime::{
|
||||
DispatchResult, DispatchError, RuntimeDebug,
|
||||
traits::{Zero, Hash, Dispatchable, Saturating},
|
||||
};
|
||||
use codec::{Ref, Encode, Decode};
|
||||
use codec::{Encode, Decode};
|
||||
use frame_support::{
|
||||
decl_module, decl_storage, decl_event, decl_error, ensure, Parameter,
|
||||
weights::{Weight, DispatchClass},
|
||||
@@ -553,8 +553,7 @@ decl_module! {
|
||||
PublicPropCount::put(index + 1);
|
||||
<DepositOf<T>>::insert(index, (value, &[&who][..]));
|
||||
|
||||
let new_prop = (index, proposal_hash, who);
|
||||
<PublicProps<T>>::append_or_put(&[Ref::from(&new_prop)][..]);
|
||||
<PublicProps<T>>::append((index, proposal_hash, who));
|
||||
|
||||
Self::deposit_event(RawEvent::Proposed(index, value));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user