@@ -131,7 +131,7 @@ mod tx_to_partially_signed_tx_general_test {
131131 0 ,
132132 vec ! [ TxInput :: Utxo ( UtxoOutPoint :: new(
133133 Id :: <Transaction >:: random_using( & mut rng) . into( ) ,
134- rng. r#gen ( ) ,
134+ rng. random ( ) ,
135135 ) ) ] ,
136136 vec ! [ TxOutput :: CreateDelegationId (
137137 delegation_dest. clone( ) ,
@@ -152,12 +152,12 @@ mod tx_to_partially_signed_tx_general_test {
152152 let tx_with_pool_creation = tx_with_outputs ( vec ! [ TxOutput :: CreateStakePool (
153153 known_pool_id,
154154 Box :: new( StakePoolData :: new(
155- Amount :: from_atoms( rng. r#gen ( ) ) ,
155+ Amount :: from_atoms( rng. random ( ) ) ,
156156 Destination :: PublicKeyHash ( PublicKeyHash :: random_using( & mut rng) ) ,
157157 random_vrf_pub_key( & mut rng) ,
158158 known_pool_decommission_dest. clone( ) ,
159159 PerThousand :: new( rng. gen_range( 0 ..=1000 ) ) . unwrap( ) ,
160- Amount :: from_atoms( rng. r#gen ( ) ) ,
160+ Amount :: from_atoms( rng. random ( ) ) ,
161161 ) ) ,
162162 ) ] ) ;
163163
@@ -209,12 +209,12 @@ mod tx_to_partially_signed_tx_general_test {
209209 let known_create_pool_utxo = TxOutput :: CreateStakePool (
210210 pool_id_for_known_create_pool_utxo,
211211 Box :: new ( StakePoolData :: new (
212- Amount :: from_atoms ( rng. r#gen ( ) ) ,
212+ Amount :: from_atoms ( rng. random ( ) ) ,
213213 Destination :: PublicKeyHash ( PublicKeyHash :: random_using ( & mut rng) ) ,
214214 random_vrf_pub_key ( & mut rng) ,
215215 pool_decommission_dest_for_known_create_pool_utxo. clone ( ) ,
216216 PerThousand :: new ( rng. gen_range ( 0 ..=1000 ) ) . unwrap ( ) ,
217- Amount :: from_atoms ( rng. r#gen ( ) ) ,
217+ Amount :: from_atoms ( rng. random ( ) ) ,
218218 ) ) ,
219219 ) ;
220220 blocks. push (
@@ -267,12 +267,12 @@ mod tx_to_partially_signed_tx_general_test {
267267 let unknown_create_pool_utxo = TxOutput :: CreateStakePool (
268268 pool_id_for_unknown_create_pool_utxo,
269269 Box :: new ( StakePoolData :: new (
270- Amount :: from_atoms ( rng. r#gen ( ) ) ,
270+ Amount :: from_atoms ( rng. random ( ) ) ,
271271 Destination :: PublicKeyHash ( PublicKeyHash :: random_using ( & mut rng) ) ,
272272 random_vrf_pub_key ( & mut rng) ,
273273 pool_decommission_dest_for_unknown_create_pool_utxo. clone ( ) ,
274274 PerThousand :: new ( rng. gen_range ( 0 ..=1000 ) ) . unwrap ( ) ,
275- Amount :: from_atoms ( rng. r#gen ( ) ) ,
275+ Amount :: from_atoms ( rng. random ( ) ) ,
276276 ) ) ,
277277 ) ;
278278 let unknown_create_pool_outpoint =
@@ -355,10 +355,10 @@ mod tx_to_partially_signed_tx_general_test {
355355 ) ,
356356 (
357357 TxInput :: Account ( AccountOutPoint :: new(
358- AccountNonce :: new( rng. r#gen ( ) ) ,
358+ AccountNonce :: new( rng. random ( ) ) ,
359359 AccountSpending :: DelegationBalance (
360360 delegation_id,
361- Amount :: from_atoms( rng. r#gen ( ) ) ,
361+ Amount :: from_atoms( rng. random ( ) ) ,
362362 ) ,
363363 ) ) ,
364364 None ,
@@ -367,10 +367,10 @@ mod tx_to_partially_signed_tx_general_test {
367367 ) ,
368368 (
369369 TxInput :: AccountCommand (
370- AccountNonce :: new( rng. r#gen ( ) ) ,
370+ AccountNonce :: new( rng. random ( ) ) ,
371371 AccountCommand :: MintTokens (
372372 wallet_tokens[ 0 ] . id,
373- Amount :: from_atoms( rng. r#gen ( ) ) ,
373+ Amount :: from_atoms( rng. random ( ) ) ,
374374 ) ,
375375 ) ,
376376 None ,
@@ -379,7 +379,7 @@ mod tx_to_partially_signed_tx_general_test {
379379 ) ,
380380 (
381381 TxInput :: AccountCommand (
382- AccountNonce :: new( rng. r#gen ( ) ) ,
382+ AccountNonce :: new( rng. random ( ) ) ,
383383 AccountCommand :: UnmintTokens ( wallet_tokens[ 1 ] . id) ,
384384 ) ,
385385 None ,
@@ -388,7 +388,7 @@ mod tx_to_partially_signed_tx_general_test {
388388 ) ,
389389 (
390390 TxInput :: AccountCommand (
391- AccountNonce :: new( rng. r#gen ( ) ) ,
391+ AccountNonce :: new( rng. random ( ) ) ,
392392 AccountCommand :: LockTokenSupply ( wallet_tokens[ 2 ] . id) ,
393393 ) ,
394394 None ,
@@ -397,7 +397,7 @@ mod tx_to_partially_signed_tx_general_test {
397397 ) ,
398398 (
399399 TxInput :: AccountCommand (
400- AccountNonce :: new( rng. r#gen ( ) ) ,
400+ AccountNonce :: new( rng. random ( ) ) ,
401401 AccountCommand :: FreezeToken (
402402 wallet_tokens[ 3 ] . id,
403403 random_is_token_unfreezable( & mut rng) ,
@@ -409,7 +409,7 @@ mod tx_to_partially_signed_tx_general_test {
409409 ) ,
410410 (
411411 TxInput :: AccountCommand (
412- AccountNonce :: new( rng. r#gen ( ) ) ,
412+ AccountNonce :: new( rng. random ( ) ) ,
413413 AccountCommand :: UnfreezeToken ( wallet_tokens[ 4 ] . id) ,
414414 ) ,
415415 None ,
@@ -418,7 +418,7 @@ mod tx_to_partially_signed_tx_general_test {
418418 ) ,
419419 (
420420 TxInput :: AccountCommand (
421- AccountNonce :: new( rng. r#gen ( ) ) ,
421+ AccountNonce :: new( rng. random ( ) ) ,
422422 AccountCommand :: ChangeTokenAuthority (
423423 wallet_tokens[ 5 ] . id,
424424 Destination :: PublicKeyHash ( PublicKeyHash :: random_using( & mut rng) ) ,
@@ -430,7 +430,7 @@ mod tx_to_partially_signed_tx_general_test {
430430 ) ,
431431 (
432432 TxInput :: AccountCommand (
433- AccountNonce :: new( rng. r#gen ( ) ) ,
433+ AccountNonce :: new( rng. random ( ) ) ,
434434 AccountCommand :: ChangeTokenMetadataUri (
435435 wallet_tokens[ 6 ] . id,
436436 gen_random_alnum_string( & mut rng, 10 , 20 ) . into_bytes( ) ,
@@ -442,7 +442,7 @@ mod tx_to_partially_signed_tx_general_test {
442442 ) ,
443443 (
444444 TxInput :: AccountCommand (
445- AccountNonce :: new( rng. r#gen ( ) ) ,
445+ AccountNonce :: new( rng. random ( ) ) ,
446446 AccountCommand :: ConcludeOrder ( wallet_orders[ 0 ] . id) ,
447447 ) ,
448448 None ,
@@ -451,10 +451,10 @@ mod tx_to_partially_signed_tx_general_test {
451451 ) ,
452452 (
453453 TxInput :: AccountCommand (
454- AccountNonce :: new( rng. r#gen ( ) ) ,
454+ AccountNonce :: new( rng. random ( ) ) ,
455455 AccountCommand :: FillOrder (
456456 wallet_orders[ 1 ] . id,
457- Amount :: from_atoms( rng. r#gen ( ) ) ,
457+ Amount :: from_atoms( rng. random ( ) ) ,
458458 fill_order_v0_dest. clone( ) ,
459459 ) ,
460460 ) ,
@@ -473,7 +473,7 @@ mod tx_to_partially_signed_tx_general_test {
473473 (
474474 TxInput :: OrderAccountCommand ( OrderAccountCommand :: FillOrder (
475475 wallet_orders[ 3 ] . id,
476- Amount :: from_atoms( rng. r#gen ( ) ) ,
476+ Amount :: from_atoms( rng. random ( ) ) ,
477477 ) ) ,
478478 None ,
479479 Some ( Destination :: AnyoneCanSpend ) ,
@@ -505,40 +505,40 @@ mod tx_to_partially_signed_tx_general_test {
505505
506506 let outputs = vec ! [
507507 TxOutput :: Transfer (
508- OutputValue :: TokenV1 ( random_token_ids[ 9 ] , Amount :: from_atoms( rng. r#gen ( ) ) ) ,
508+ OutputValue :: TokenV1 ( random_token_ids[ 9 ] , Amount :: from_atoms( rng. random ( ) ) ) ,
509509 Destination :: PublicKeyHash ( PublicKeyHash :: random_using( & mut rng) ) ,
510510 ) ,
511511 TxOutput :: LockThenTransfer (
512- OutputValue :: TokenV1 ( random_token_ids[ 10 ] , Amount :: from_atoms( rng. r#gen ( ) ) ) ,
512+ OutputValue :: TokenV1 ( random_token_ids[ 10 ] , Amount :: from_atoms( rng. random ( ) ) ) ,
513513 Destination :: PublicKeyHash ( PublicKeyHash :: random_using( & mut rng) ) ,
514- OutputTimeLock :: ForBlockCount ( rng. r#gen ( ) ) ,
514+ OutputTimeLock :: ForBlockCount ( rng. random ( ) ) ,
515515 ) ,
516516 TxOutput :: Burn ( OutputValue :: TokenV1 (
517517 random_token_ids[ 11 ] ,
518- Amount :: from_atoms( rng. r#gen ( ) ) ,
518+ Amount :: from_atoms( rng. random ( ) ) ,
519519 ) ) ,
520520 TxOutput :: CreateStakePool (
521521 PoolId :: random_using( & mut rng) ,
522522 Box :: new( StakePoolData :: new(
523- Amount :: from_atoms( rng. r#gen ( ) ) ,
523+ Amount :: from_atoms( rng. random ( ) ) ,
524524 Destination :: PublicKeyHash ( PublicKeyHash :: random_using( & mut rng) ) ,
525525 random_vrf_pub_key( & mut rng) ,
526526 Destination :: PublicKeyHash ( PublicKeyHash :: random_using( & mut rng) ) ,
527527 PerThousand :: new( rng. gen_range( 0 ..=1000 ) ) . unwrap( ) ,
528- Amount :: from_atoms( rng. r#gen ( ) ) ,
528+ Amount :: from_atoms( rng. random ( ) ) ,
529529 ) ) ,
530530 ) ,
531531 TxOutput :: CreateDelegationId (
532532 Destination :: PublicKeyHash ( PublicKeyHash :: random_using( & mut rng) ) ,
533533 PoolId :: random_using( & mut rng) ,
534534 ) ,
535535 TxOutput :: DelegateStaking (
536- Amount :: from_atoms( rng. r#gen ( ) ) ,
536+ Amount :: from_atoms( rng. random ( ) ) ,
537537 DelegationId :: random_using( & mut rng) ,
538538 ) ,
539539 TxOutput :: IssueFungibleToken ( Box :: new( TokenIssuance :: V1 ( TokenIssuanceV1 {
540540 token_ticker: gen_random_alnum_string( & mut rng, 10 , 20 ) . into_bytes( ) ,
541- number_of_decimals: rng. r#gen ( ) ,
541+ number_of_decimals: rng. random ( ) ,
542542 metadata_uri: gen_random_alnum_string( & mut rng, 10 , 20 ) . into_bytes( ) ,
543543 total_supply: TokenTotalSupply :: Unlimited ,
544544 authority: Destination :: PublicKeyHash ( PublicKeyHash :: random_using( & mut rng) ) ,
@@ -551,18 +551,18 @@ mod tx_to_partially_signed_tx_general_test {
551551 ) ,
552552 TxOutput :: DataDeposit ( gen_random_bytes( & mut rng, 10 , 20 ) ) ,
553553 TxOutput :: Htlc (
554- OutputValue :: TokenV1 ( random_token_ids[ 12 ] , Amount :: from_atoms( rng. r#gen ( ) ) ) ,
554+ OutputValue :: TokenV1 ( random_token_ids[ 12 ] , Amount :: from_atoms( rng. random ( ) ) ) ,
555555 Box :: new( HashedTimelockContract {
556556 secret_hash: HtlcSecretHash :: random_using( & mut rng) ,
557557 spend_key: Destination :: PublicKeyHash ( PublicKeyHash :: random_using( & mut rng) ) ,
558- refund_timelock: OutputTimeLock :: ForBlockCount ( rng. r#gen ( ) ) ,
558+ refund_timelock: OutputTimeLock :: ForBlockCount ( rng. random ( ) ) ,
559559 refund_key: Destination :: PublicKeyHash ( PublicKeyHash :: random_using( & mut rng) ) ,
560560 } ) ,
561561 ) ,
562562 TxOutput :: CreateOrder ( Box :: new( OrderData :: new(
563563 Destination :: PublicKeyHash ( PublicKeyHash :: random_using( & mut rng) ) ,
564- OutputValue :: TokenV1 ( random_token_ids[ 13 ] , Amount :: from_atoms( rng. r#gen ( ) ) ) ,
565- OutputValue :: TokenV1 ( random_token_ids[ 14 ] , Amount :: from_atoms( rng. r#gen ( ) ) ) ,
564+ OutputValue :: TokenV1 ( random_token_ids[ 13 ] , Amount :: from_atoms( rng. random ( ) ) ) ,
565+ OutputValue :: TokenV1 ( random_token_ids[ 14 ] , Amount :: from_atoms( rng. random ( ) ) ) ,
566566 ) ) ) ,
567567 ] ;
568568
@@ -722,7 +722,7 @@ mod tx_to_partially_signed_tx_general_test {
722722 for _ in 0 ..tokens_count {
723723 let tx_inputs = vec ! [ TxInput :: Utxo ( UtxoOutPoint :: new(
724724 Id :: <Transaction >:: random_using( rng) . into( ) ,
725- rng. r#gen ( ) ,
725+ rng. random ( ) ,
726726 ) ) ] ;
727727 let id = make_token_id ( chain_config, BlockHeight :: new ( 0 ) , & tx_inputs) . unwrap ( ) ;
728728 let authority = wallet_new_dest ( wallet) ;
@@ -778,7 +778,7 @@ mod tx_to_partially_signed_tx_general_test {
778778 for curencies in curencies {
779779 let tx_inputs = vec ! [ TxInput :: Utxo ( UtxoOutPoint :: new(
780780 Id :: <Transaction >:: random_using( rng) . into( ) ,
781- rng. r#gen ( ) ,
781+ rng. random ( ) ,
782782 ) ) ] ;
783783 let id = make_order_id ( & tx_inputs) . unwrap ( ) ;
784784 let initially_asked = curencies. ask . into_output_value ( Amount :: from_atoms ( rng. random ( ) ) ) ;
0 commit comments