@@ -69,10 +69,10 @@ trait ObjectGenerators {
69
69
arrayList <- Gen .nonEmptyListOf(byteArrayOfNItemsGen(size))
70
70
} yield byteStringList.zip(arrayList)
71
71
72
- def receiptGen () : Gen [Receipt ] =
73
- Gen .oneOf(legacyReceiptGen() , type01ReceiptGen() )
72
+ def receiptGen : Gen [Receipt ] =
73
+ Gen .oneOf(legacyReceiptGen, type01ReceiptGen)
74
74
75
- def legacyReceiptGen () : Gen [LegacyReceipt ] = for {
75
+ def legacyReceiptGen : Gen [LegacyReceipt ] = for {
76
76
postTransactionStateHash <- byteArrayOfNItemsGen(32 )
77
77
cumulativeGasUsed <- bigIntGen
78
78
logsBloomFilter <- byteArrayOfNItemsGen(256 )
@@ -83,19 +83,19 @@ trait ObjectGenerators {
83
83
logs = Seq ()
84
84
)
85
85
86
- def type01ReceiptGen () : Gen [Type01Receipt ] = legacyReceiptGen() .map(Type01Receipt (_))
86
+ def type01ReceiptGen : Gen [Type01Receipt ] = legacyReceiptGen.map(Type01Receipt (_))
87
87
88
88
def addressGen : Gen [Address ] = byteArrayOfNItemsGen(20 ).map(Address (_))
89
89
90
- def accessListItemGen () : Gen [AccessListItem ] = for {
90
+ def accessListItemGen : Gen [AccessListItem ] = for {
91
91
address <- addressGen
92
92
storageKeys <- Gen .listOf(bigIntGen)
93
93
} yield AccessListItem (address, storageKeys)
94
94
95
- def transactionGen () : Gen [Transaction ] =
96
- Gen .oneOf(legacyTransactionGen() , typedTransactionGen() )
95
+ def transactionGen : Gen [Transaction ] =
96
+ Gen .oneOf(legacyTransactionGen, typedTransactionGen)
97
97
98
- def legacyTransactionGen () : Gen [LegacyTransaction ] = for {
98
+ def legacyTransactionGen : Gen [LegacyTransaction ] = for {
99
99
nonce <- bigIntGen
100
100
gasPrice <- bigIntGen
101
101
gasLimit <- bigIntGen
@@ -111,15 +111,15 @@ trait ObjectGenerators {
111
111
payload
112
112
)
113
113
114
- def typedTransactionGen () : Gen [TransactionWithAccessList ] = for {
114
+ def typedTransactionGen : Gen [TransactionWithAccessList ] = for {
115
115
chainId <- bigIntGen
116
116
nonce <- bigIntGen
117
117
gasPrice <- bigIntGen
118
118
gasLimit <- bigIntGen
119
119
receivingAddress <- addressGen
120
120
value <- bigIntGen
121
121
payload <- byteStringOfLengthNGen(256 )
122
- accessList <- Gen .listOf(accessListItemGen() )
122
+ accessList <- Gen .listOf(accessListItemGen)
123
123
} yield TransactionWithAccessList (
124
124
chainId,
125
125
nonce,
@@ -131,7 +131,7 @@ trait ObjectGenerators {
131
131
accessList
132
132
)
133
133
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))
135
135
136
136
def branchNodeGen : Gen [BranchNode ] = for {
137
137
children <- Gen
@@ -172,7 +172,7 @@ trait ObjectGenerators {
172
172
173
173
def signedTxSeqGen (length : Int , secureRandom : SecureRandom , chainId : Option [Byte ]): Gen [Seq [SignedTransaction ]] = {
174
174
val senderKeys = crypto.generateKeyPair(secureRandom)
175
- val txsSeqGen = Gen .listOfN(length, transactionGen() )
175
+ val txsSeqGen = Gen .listOfN(length, transactionGen)
176
176
txsSeqGen.map { txs =>
177
177
txs.map { tx =>
178
178
SignedTransaction .sign(tx, senderKeys, chainId)
@@ -183,7 +183,7 @@ trait ObjectGenerators {
183
183
def signedTxGen (secureRandom : SecureRandom , chainId : Option [Byte ]): Gen [SignedTransaction ] = {
184
184
val senderKeys = crypto.generateKeyPair(secureRandom)
185
185
for {
186
- tx <- transactionGen()
186
+ tx <- transactionGen
187
187
} yield SignedTransaction .sign(tx, senderKeys, chainId)
188
188
}
189
189
0 commit comments