@@ -39,7 +39,7 @@ use crate::{Amount, SignedAmount, VarInt};
3939pub use crate :: consensus:: validation:: TxVerifyError ;
4040
4141#[ cfg( feature = "arbitrary" ) ]
42- use arbitrary :: { Arbitrary , Unstructured } ;
42+ use actual_arbitrary :: { Arbitrary , Unstructured } ;
4343
4444hashes:: hash_newtype! {
4545 /// A bitcoin transaction hash/transaction ID.
@@ -1650,7 +1650,7 @@ impl InputWeightPrediction {
16501650
16511651#[ cfg( feature = "arbitrary" ) ]
16521652impl < ' a > Arbitrary < ' a > for InputWeightPrediction {
1653- fn arbitrary ( u : & mut Unstructured < ' a > ) -> arbitrary :: Result < Self > {
1653+ fn arbitrary ( u : & mut Unstructured < ' a > ) -> actual_arbitrary :: Result < Self > {
16541654 // limit script size to 4Mwu block size.
16551655 let max_block = Weight :: MAX_BLOCK . to_wu ( ) as usize ;
16561656 let input_script_len = u. int_in_range ( 0 ..=max_block) ?;
@@ -1681,14 +1681,14 @@ impl<'a> Arbitrary<'a> for InputWeightPrediction {
16811681
16821682#[ cfg( feature = "arbitrary" ) ]
16831683impl < ' a > Arbitrary < ' a > for OutPoint {
1684- fn arbitrary ( u : & mut Unstructured < ' a > ) -> arbitrary :: Result < Self > {
1684+ fn arbitrary ( u : & mut Unstructured < ' a > ) -> actual_arbitrary :: Result < Self > {
16851685 Ok ( OutPoint { txid : Txid :: arbitrary ( u) ?, vout : u32:: arbitrary ( u) ? } )
16861686 }
16871687}
16881688
16891689#[ cfg( feature = "arbitrary" ) ]
16901690impl < ' a > Arbitrary < ' a > for Sequence {
1691- fn arbitrary ( u : & mut Unstructured < ' a > ) -> arbitrary :: Result < Self > {
1691+ fn arbitrary ( u : & mut Unstructured < ' a > ) -> actual_arbitrary :: Result < Self > {
16921692 let choice_range = 8 ;
16931693
16941694 // Equally weight the cases of meaningful sequence numbers
@@ -1709,7 +1709,7 @@ impl<'a> Arbitrary<'a> for Sequence {
17091709
17101710#[ cfg( feature = "arbitrary" ) ]
17111711impl < ' a > Arbitrary < ' a > for Transaction {
1712- fn arbitrary ( u : & mut Unstructured < ' a > ) -> arbitrary :: Result < Self > {
1712+ fn arbitrary ( u : & mut Unstructured < ' a > ) -> actual_arbitrary :: Result < Self > {
17131713 use absolute:: LockTime ;
17141714
17151715 Ok ( Transaction {
@@ -1723,7 +1723,7 @@ impl<'a> Arbitrary<'a> for Transaction {
17231723
17241724#[ cfg( feature = "arbitrary" ) ]
17251725impl < ' a > Arbitrary < ' a > for TxIn {
1726- fn arbitrary ( u : & mut Unstructured < ' a > ) -> arbitrary :: Result < Self > {
1726+ fn arbitrary ( u : & mut Unstructured < ' a > ) -> actual_arbitrary :: Result < Self > {
17271727 Ok ( TxIn {
17281728 previous_output : OutPoint :: arbitrary ( u) ?,
17291729 script_sig : ScriptBuf :: arbitrary ( u) ?,
@@ -1735,7 +1735,7 @@ impl<'a> Arbitrary<'a> for TxIn {
17351735
17361736#[ cfg( feature = "arbitrary" ) ]
17371737impl < ' a > Arbitrary < ' a > for Txid {
1738- fn arbitrary ( u : & mut Unstructured < ' a > ) -> arbitrary :: Result < Self > {
1738+ fn arbitrary ( u : & mut Unstructured < ' a > ) -> actual_arbitrary :: Result < Self > {
17391739 let arbitrary_bytes = u. arbitrary ( ) ?;
17401740 let t = sha256d:: Hash :: from_byte_array ( arbitrary_bytes) ;
17411741 Ok ( Txid ( t) )
@@ -1744,14 +1744,14 @@ impl<'a> Arbitrary<'a> for Txid {
17441744
17451745#[ cfg( feature = "arbitrary" ) ]
17461746impl < ' a > Arbitrary < ' a > for TxOut {
1747- fn arbitrary ( u : & mut Unstructured < ' a > ) -> arbitrary :: Result < Self > {
1747+ fn arbitrary ( u : & mut Unstructured < ' a > ) -> actual_arbitrary :: Result < Self > {
17481748 Ok ( TxOut { value : Amount :: arbitrary ( u) ?, script_pubkey : ScriptBuf :: arbitrary ( u) ? } )
17491749 }
17501750}
17511751
17521752#[ cfg( feature = "arbitrary" ) ]
17531753impl < ' a > Arbitrary < ' a > for Version {
1754- fn arbitrary ( u : & mut Unstructured < ' a > ) -> arbitrary :: Result < Self > {
1754+ fn arbitrary ( u : & mut Unstructured < ' a > ) -> actual_arbitrary :: Result < Self > {
17551755 // Equally weight the case of normal version numbers
17561756 let choice = u. int_in_range ( 0 ..=2 ) ?;
17571757 match choice {
@@ -1764,7 +1764,7 @@ impl<'a> Arbitrary<'a> for Version {
17641764
17651765#[ cfg( feature = "arbitrary" ) ]
17661766impl < ' a > Arbitrary < ' a > for Wtxid {
1767- fn arbitrary ( u : & mut Unstructured < ' a > ) -> arbitrary :: Result < Self > {
1767+ fn arbitrary ( u : & mut Unstructured < ' a > ) -> actual_arbitrary :: Result < Self > {
17681768 Ok ( Wtxid :: from_byte_array ( u. arbitrary ( ) ?) )
17691769 }
17701770}
0 commit comments