@@ -69,10 +69,10 @@ trait ObjectGenerators {
6969 arrayList <- Gen .nonEmptyListOf(byteArrayOfNItemsGen(size))
7070 } yield byteStringList.zip(arrayList)
7171
72- def receiptGen () : Gen [Receipt ] =
73- Gen .oneOf(legacyReceiptGen() , type01ReceiptGen() )
72+ def receiptGen : Gen [Receipt ] =
73+ Gen .oneOf(legacyReceiptGen, type01ReceiptGen)
7474
75- def legacyReceiptGen () : Gen [LegacyReceipt ] = for {
75+ def legacyReceiptGen : Gen [LegacyReceipt ] = for {
7676 postTransactionStateHash <- byteArrayOfNItemsGen(32 )
7777 cumulativeGasUsed <- bigIntGen
7878 logsBloomFilter <- byteArrayOfNItemsGen(256 )
@@ -83,19 +83,19 @@ trait ObjectGenerators {
8383 logs = Seq ()
8484 )
8585
86- def type01ReceiptGen () : Gen [Type01Receipt ] = legacyReceiptGen() .map(Type01Receipt (_))
86+ def type01ReceiptGen : Gen [Type01Receipt ] = legacyReceiptGen.map(Type01Receipt (_))
8787
8888 def addressGen : Gen [Address ] = byteArrayOfNItemsGen(20 ).map(Address (_))
8989
90- def accessListItemGen () : Gen [AccessListItem ] = for {
90+ def accessListItemGen : Gen [AccessListItem ] = for {
9191 address <- addressGen
9292 storageKeys <- Gen .listOf(bigIntGen)
9393 } yield AccessListItem (address, storageKeys)
9494
95- def transactionGen () : Gen [Transaction ] =
96- Gen .oneOf(legacyTransactionGen() , typedTransactionGen() )
95+ def transactionGen : Gen [Transaction ] =
96+ Gen .oneOf(legacyTransactionGen, typedTransactionGen)
9797
98- def legacyTransactionGen () : Gen [LegacyTransaction ] = for {
98+ def legacyTransactionGen : Gen [LegacyTransaction ] = for {
9999 nonce <- bigIntGen
100100 gasPrice <- bigIntGen
101101 gasLimit <- bigIntGen
@@ -111,15 +111,15 @@ trait ObjectGenerators {
111111 payload
112112 )
113113
114- def typedTransactionGen () : Gen [TransactionWithAccessList ] = for {
114+ def typedTransactionGen : Gen [TransactionWithAccessList ] = for {
115115 chainId <- bigIntGen
116116 nonce <- bigIntGen
117117 gasPrice <- bigIntGen
118118 gasLimit <- bigIntGen
119119 receivingAddress <- addressGen
120120 value <- bigIntGen
121121 payload <- byteStringOfLengthNGen(256 )
122- accessList <- Gen .listOf(accessListItemGen() )
122+ accessList <- Gen .listOf(accessListItemGen)
123123 } yield TransactionWithAccessList (
124124 chainId,
125125 nonce,
@@ -131,7 +131,7 @@ trait ObjectGenerators {
131131 accessList
132132 )
133133
134- def receiptsGen (n : Int ): Gen [Seq [Seq [Receipt ]]] = Gen .listOfN(n, Gen .listOf(receiptGen() ))
134+ def receiptsGen (n : Int ): Gen [Seq [Seq [Receipt ]]] = Gen .listOfN(n, Gen .listOf(receiptGen))
135135
136136 def branchNodeGen : Gen [BranchNode ] = for {
137137 children <- Gen
@@ -172,7 +172,7 @@ trait ObjectGenerators {
172172
173173 def signedTxSeqGen (length : Int , secureRandom : SecureRandom , chainId : Option [Byte ]): Gen [Seq [SignedTransaction ]] = {
174174 val senderKeys = crypto.generateKeyPair(secureRandom)
175- val txsSeqGen = Gen .listOfN(length, transactionGen() )
175+ val txsSeqGen = Gen .listOfN(length, transactionGen)
176176 txsSeqGen.map { txs =>
177177 txs.map { tx =>
178178 SignedTransaction .sign(tx, senderKeys, chainId)
@@ -183,7 +183,7 @@ trait ObjectGenerators {
183183 def signedTxGen (secureRandom : SecureRandom , chainId : Option [Byte ]): Gen [SignedTransaction ] = {
184184 val senderKeys = crypto.generateKeyPair(secureRandom)
185185 for {
186- tx <- transactionGen()
186+ tx <- transactionGen
187187 } yield SignedTransaction .sign(tx, senderKeys, chainId)
188188 }
189189
0 commit comments