Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
  • Loading branch information
4 people authored Jun 1, 2021
1 parent 9b61628 commit 48987b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions frame/transaction-storage/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Transaction Storage Pallet

Indexes transactions and manages storage proofs.
# Transaction Storage Pallet

Indexes transactions and manages storage proofs.

License: Apache-2.0
6 changes: 3 additions & 3 deletions frame/transaction-storage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type BalanceOf<T> = <<T as Config>::Currency as Currency<<T as frame_system::Con
pub use pallet::*;
pub use weights::WeightInfo;

/// Maximum bytes that can be storead in one transaction.
/// Maximum bytes that can be stored in one transaction.
// Increasing it further also requires raising the allocator limit.
pub const MAX_DATA_SIZE: u32 = 8 * 1024 * 1024;

Expand Down Expand Up @@ -145,7 +145,7 @@ pub mod pallet {
pub(super) fn store(
origin: OriginFor<T>,
data: Vec<u8>,
) -> DispatchResultWithPostInfo {
) -> DispatchResult {
ensure!(data.len() > 0, Error::<T>::EmptyTransaction);
Self::apply_fee(origin, data.len() as u32)?;

Expand All @@ -165,7 +165,7 @@ pub mod pallet {
content_hash: content_hash.into(),
});
Self::deposit_event(Event::Stored(counter));
Ok(().into())
Ok(())
}

/// Renew previously stored data. Parameters are the block number that contains
Expand Down

0 comments on commit 48987b6

Please sign in to comment.