@@ -148,14 +148,10 @@ pub mod pallet {
148
148
+ Default
149
149
+ MaxEncodedLen ;
150
150
151
- /// A means of providing some cost for storing annoucement data on-chain.
151
+ /// A means of providing some cost for storing announcement data on-chain.
152
152
type AnnouncementConsideration : Consideration < Self :: AccountId , Footprint > ;
153
153
154
- /// The amount of currency needed per proxy added.
155
- ///
156
- /// This is held for adding 32 bytes plus an instance of `ProxyType` more into a
157
- /// pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take
158
- /// into account `32 + proxy_type.encode().len()` bytes of data.
154
+ /// A means of providing some cost for storing proxy data on-chain.
159
155
type ProxyConsideration : Consideration < Self :: AccountId , Footprint > ;
160
156
161
157
/// The maximum amount of proxies allowed for a single account.
@@ -420,22 +416,18 @@ pub mod pallet {
420
416
let ( mut pending, ticket) = if let Some ( v) = value. take ( ) {
421
417
v
422
418
} else {
423
- let bounded_announcements: BoundedVec <
424
- Announcement < T :: AccountId , CallHashOf < T > , BlockNumberFor < T > > ,
425
- T :: MaxPending ,
426
- > = Default :: default ( ) ;
427
419
(
428
- bounded_announcements ,
420
+ Default :: default ( ) ,
429
421
T :: AnnouncementConsideration :: new (
430
422
& who,
431
- Footprint :: from_parts ( 0 , Self :: annoucement_size_bytes ( ) ) ,
423
+ Footprint :: from_parts ( 0 , Self :: announcement_size_bytes ( ) ) ,
432
424
) ?,
433
425
)
434
426
} ;
435
427
pending. try_push ( announcement) . map_err ( |_| Error :: < T > :: TooMany ) ?;
436
428
let new_ticket = ticket. clone ( ) . update (
437
429
& who,
438
- Footprint :: from_parts ( pending. len ( ) , Self :: annoucement_size_bytes ( ) ) ,
430
+ Footprint :: from_parts ( pending. len ( ) , Self :: announcement_size_bytes ( ) ) ,
439
431
) ?;
440
432
* value = Some ( ( pending, new_ticket) ) ;
441
433
Ok :: < ( ) , DispatchError > ( ( ) )
@@ -632,7 +624,7 @@ pub mod pallet {
632
624
}
633
625
634
626
impl < T : Config > Pallet < T > {
635
- const fn annoucement_size_bytes ( ) -> usize {
627
+ const fn announcement_size_bytes ( ) -> usize {
636
628
core:: mem:: size_of :: < Announcement < T :: AccountId , CallHashOf < T > , BlockNumberFor < T > > > ( )
637
629
}
638
630
@@ -708,12 +700,8 @@ impl<T: Config> Pallet<T> {
708
700
let ( mut proxies, ticket) = if let Some ( v) = value. take ( ) {
709
701
v
710
702
} else {
711
- let bounded_proxies: BoundedVec <
712
- ProxyDefinition < T :: AccountId , T :: ProxyType , BlockNumberFor < T > > ,
713
- T :: MaxProxies ,
714
- > = Default :: default ( ) ;
715
703
(
716
- bounded_proxies ,
704
+ Default :: default ( ) ,
717
705
T :: ProxyConsideration :: new (
718
706
delegator,
719
707
Footprint :: from_parts ( 0 , Self :: proxy_def_size_bytes ( ) ) ,
@@ -800,7 +788,7 @@ impl<T: Config> Pallet<T> {
800
788
ensure ! ( orig_pending_len > pending. len( ) , Error :: <T >:: NotFound ) ;
801
789
let new_ticket = ticket. update (
802
790
delegate,
803
- Footprint :: from_parts ( pending. len ( ) , Self :: annoucement_size_bytes ( ) ) ,
791
+ Footprint :: from_parts ( pending. len ( ) , Self :: announcement_size_bytes ( ) ) ,
804
792
) ?;
805
793
* x = Some ( ( pending, new_ticket) ) ;
806
794
Ok ( ( ) )
0 commit comments