@@ -108,7 +108,7 @@ mod weight_for {
108108 signed_simplex_states_len : u64 ,
109109 signed_simplex_states_len_weight : u64 ,
110110 ) -> Weight {
111- T :: DbWeight :: get ( ) . reads_writes ( signed_simplex_states_len + 2 , 2 )
111+ T :: DbWeight :: get ( ) . reads_writes ( signed_simplex_states_len, 2 )
112112 . saturating_add ( 50_000_000 )
113113 . saturating_add ( signed_simplex_states_len_weight. saturating_mul ( 100_000_000 ) )
114114 }
@@ -399,11 +399,11 @@ decl_module! {
399399 /// - Complexity: `O(1)`
400400 /// - DB:
401401 /// - 2 storage reads `ChannelMap`
402- /// - 2 storage mutation `ChannelMap`
402+ /// - 1 storage mutation `ChannelMap`
403403 /// - 2 storage reads `Wallets`
404404 /// - 2 storage mutation `Wallets`
405405 /// # </weight>
406- #[ weight = 100_000_000 + T :: DbWeight :: get( ) . reads_writes( 4 , 4 ) ]
406+ #[ weight = 100_000_000 + T :: DbWeight :: get( ) . reads_writes( 4 , 3 ) ]
407407 fn confirm_withdraw(
408408 origin,
409409 channel_id: T :: Hash
@@ -447,11 +447,11 @@ decl_module! {
447447 /// - Complexity: `O(1)`
448448 /// - DB:
449449 /// - 2 storage reads `ChannelMap`
450- /// - 2 storage mutation `ChannelMap`
450+ /// - 1 storage mutation `ChannelMap`
451451 /// - 2 storage reads `Wallets`
452452 /// - 2 storage mutation `Wallets`
453453 /// # </weight>
454- #[ weight = 100_000_000 + T :: DbWeight :: get( ) . reads_writes( 4 , 4 ) ]
454+ #[ weight = 100_000_000 + T :: DbWeight :: get( ) . reads_writes( 4 , 3 ) ]
455455 fn cooperative_withdraw(
456456 origin,
457457 cooperative_withdraw_request: CooperativeWithdrawRequestOf <T >
@@ -479,7 +479,7 @@ decl_module! {
479479 /// - `M` pay_hashes-len
480480 /// - DB:
481481 /// - N storage reads `ChannelMap`
482- /// - 2 * N storage mutation `ChannelMap`
482+ /// - N storage mutation `ChannelMap`
483483 /// - 2 * M storage reads `PayInfoMap`
484484 /// # </weight>
485485 #[ weight = (
@@ -513,10 +513,10 @@ decl_module! {
513513 /// - Complexity: `O(N)`
514514 /// - `N` pay_ids-len
515515 /// - DB:
516- /// - 2 storage reads `ChannelMap`
516+ /// - 1 storage reads `ChannelMap`
517517 /// - 1 storage mutation `ChannelMap`
518518 /// # </weight>
519- #[ weight = 100_000_000 + T :: DbWeight :: get( ) . reads_writes( 2 , 1 ) ]
519+ #[ weight = 100_000_000 + T :: DbWeight :: get( ) . reads_writes( 1 , 1 ) ]
520520 fn clear_pays(
521521 origin,
522522 channel_id: T :: Hash ,
@@ -540,13 +540,13 @@ decl_module! {
540540 /// - Complexity: `O(1)`
541541 /// - DB:
542542 /// - 1 storage reads `ChannelMap`
543- /// - 2 storage mutation `ChannelMap`
544- /// - 1 storage reads `ChannelStatusNums`
545- /// - 1 storage mutation `ChannelStatusNums`
546- /// - 1 storage reads `Wallets`
547- /// - 1 storage mutation `Wallets`
543+ /// - 1 storage mutation `ChannelMap`
544+ /// - 2 storage reads `ChannelStatusNums`
545+ /// - 2 storage mutation `ChannelStatusNums`
546+ /// - 2 storage reads `Wallets`
547+ /// - 2 storage mutation `Wallets`
548548 /// # </weight>
549- #[ weight = 100_000_000 + T :: DbWeight :: get( ) . reads_writes( 3 , 4 ) ]
549+ #[ weight = 100_000_000 + T :: DbWeight :: get( ) . reads_writes( 5 , 5 ) ]
550550 fn confirm_settle(
551551 origin,
552552 channel_id: T :: Hash
@@ -567,12 +567,12 @@ decl_module! {
567567 /// - DB:
568568 /// - 2 storage reads `ChannelMap`
569569 /// - 1 storage mutation `ChannelMap`
570- /// - 1 storage reads `ChannelStatusNums`
571- /// - 1 storage mutation `ChannelStatusNums`
572- /// - 1 storage reads `Wallets`
573- /// - 1 storage mutation `Wallets`
570+ /// - 2 storage reads `ChannelStatusNums`
571+ /// - 2 storage mutation `ChannelStatusNums`
572+ /// - 2 storage reads `Wallets`
573+ /// - 2 storage mutation `Wallets`
574574 /// # </weight>
575- #[ weight = 100_000_000 + T :: DbWeight :: get( ) . reads_writes( 4 , 3 ) ]
575+ #[ weight = 100_000_000 + T :: DbWeight :: get( ) . reads_writes( 6 , 5 ) ]
576576 fn cooperative_settle(
577577 origin,
578578 settle_request: CooperativeSettleRequestOf <T >
@@ -593,8 +593,8 @@ decl_module! {
593593 /// ## Weight
594594 /// - Complexity: `O(1)`
595595 /// - DB:
596- /// - 2 storage reads `Balances `
597- /// - 1 storage mutation `Balances `
596+ /// - 2 storage reads `PoolBalances `
597+ /// - 1 storage mutation `PoolBalances `
598598 /// #</weight>
599599 #[ weight = 100_000_000 + T :: DbWeight :: get( ) . reads_writes( 2 , 1 ) ]
600600 fn deposit_pool(
@@ -615,10 +615,10 @@ decl_module! {
615615 /// ## Weight
616616 /// - Complexity: `O(1)`
617617 /// - DB:
618- /// - 2 storage reads `Balances `
619- /// - 1 storage mutation `Balances `
618+ /// - 1 storage reads `PoolBalances `
619+ /// - 1 storage mutation `PoolBalances `
620620 /// # </weight>
621- #[ weight = 100_000_000 + T :: DbWeight :: get( ) . reads_writes( 2 , 1 ) ]
621+ #[ weight = 100_000_000 + T :: DbWeight :: get( ) . reads_writes( 1 , 1 ) ]
622622 fn withdraw_from_pool(
623623 origin,
624624 value: BalanceOf <T >
@@ -660,12 +660,12 @@ decl_module! {
660660 /// ## Weight
661661 /// - Complexity: `O(1)`
662662 /// - DB:
663- /// - 2 storage reads `Allowed`
663+ /// - 1 storage reads `Allowed`
664664 /// - 1 storage mutation `Allowed`
665- /// - 3 storage reads `Balances `
666- /// - 1 storage mutation `Balances `
665+ /// - 2 storage reads `PoolBalances `
666+ /// - 1 storage mutation `PoolBalances `
667667 /// # </weight>
668- #[ weight = 100_000_000 + T :: DbWeight :: get( ) . reads_writes( 5 , 2 ) ]
668+ #[ weight = 100_000_000 + T :: DbWeight :: get( ) . reads_writes( 3 , 2 ) ]
669669 fn transfer_from(
670670 origin,
671671 from: T :: AccountId ,
@@ -1165,8 +1165,6 @@ decl_event! (
11651165 DepositToPool ( AccountId , Balance ) ,
11661166 /// WithdrawFromPool(receiver, amount)
11671167 WithdrawFromPool ( AccountId , Balance ) ,
1168- /// Transfer(from, receiver, amount)
1169- Transfer ( AccountId , AccountId , Balance ) ,
11701168 /// Approval(owner, spender, amount)
11711169 Approval ( AccountId , AccountId , Balance ) ,
11721170
@@ -1259,7 +1257,7 @@ decl_error! {
12591257 // confrom_settle fail
12601258 ConfirmSettleFail ,
12611259 // Balances is not exist
1262- BalancesNotExist ,
1260+ PoolBalancesNotExist ,
12631261 // Wallet is not exist
12641262 WalletNotExist ,
12651263 // Allowed is not exist
0 commit comments