rustfmt ghost slow clap and fix typos
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
		
							parent
							
								
									792e70c988
								
							
						
					
					
						commit
						7216f1d82b
					
				| @ -1,6 +1,6 @@ | |||||||
| [package] | [package] | ||||||
| name = "ghost-slow-clap" | name = "ghost-slow-clap" | ||||||
| version = "0.3.34" | version = "0.3.35" | ||||||
| description = "Applause protocol for the EVM bridge" | description = "Applause protocol for the EVM bridge" | ||||||
| license.workspace = true | license.workspace = true | ||||||
| authors.workspace = true | authors.workspace = true | ||||||
|  | |||||||
| @ -702,23 +702,27 @@ impl<T: Config> Pallet<T> { | |||||||
|         ); |         ); | ||||||
| 
 | 
 | ||||||
|         let random_seed = sp_io::offchain::random_seed(); |         let random_seed = sp_io::offchain::random_seed(); | ||||||
|         let random_number = <u32>::decode( |         let random_number = <u32>::decode(&mut TrailingZeroInput::new(random_seed.as_ref())) | ||||||
|             &mut TrailingZeroInput::new(random_seed.as_ref()) |             .expect("input is padded with zeroes; qed"); | ||||||
|         ).expect("input is padded with zeroes; qed"); |  | ||||||
| 
 | 
 | ||||||
|         let rpc_endpoint = if stored_endpoints.len() > 0 { |         let rpc_endpoint = if stored_endpoints.len() > 0 { | ||||||
|             stored_endpoints |             stored_endpoints | ||||||
|                 .iter() |                 .iter() | ||||||
|                 .nth((random_number as usize) |                 .nth( | ||||||
|  |                     (random_number as usize) | ||||||
|                         .checked_rem(stored_endpoints.len()) |                         .checked_rem(stored_endpoints.len()) | ||||||
|                     .unwrap_or_default()) |                         .unwrap_or_default(), | ||||||
|  |                 ) | ||||||
|                 .expect("stored endpoint should be non empty; qed") |                 .expect("stored endpoint should be non empty; qed") | ||||||
|         } else { |         } else { | ||||||
|             network_data.default_endpoints |             network_data | ||||||
|  |                 .default_endpoints | ||||||
|                 .iter() |                 .iter() | ||||||
|                 .nth((random_number as usize) |                 .nth( | ||||||
|  |                     (random_number as usize) | ||||||
|                         .checked_rem(network_data.default_endpoints.len()) |                         .checked_rem(network_data.default_endpoints.len()) | ||||||
|                     .unwrap_or_default()) |                         .unwrap_or_default(), | ||||||
|  |                 ) | ||||||
|                 .expect("default endpoint should be non empty; qed") |                 .expect("default endpoint should be non empty; qed") | ||||||
|         }; |         }; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user