@@ -40,8 +40,7 @@ class BlockGeneratorSpec extends FlatSpec with Matchers with PropertyChecks with
40
40
}
41
41
42
42
it should " generate correct block with transactions" in new TestSetup {
43
- val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(
44
- bestBlock, Seq (signedTransaction), Address (testAddress), blockGenerator.emptyX)
43
+ val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(bestBlock, Seq (signedTransaction), Address (testAddress), blockGenerator.emptyX)
45
44
result shouldBe a[Right [_, Block ]]
46
45
47
46
// mined with mantis + ethminer
@@ -58,8 +57,7 @@ class BlockGeneratorSpec extends FlatSpec with Matchers with PropertyChecks with
58
57
59
58
60
59
it should " be possible to simulate transaction, on world returned with pending block " in new TestSetup {
61
- val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(
62
- bestBlock, Seq (signedTransaction), Address (testAddress), blockGenerator.emptyX)
60
+ val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(bestBlock, Seq (signedTransaction), Address (testAddress), blockGenerator.emptyX)
63
61
result shouldBe a[Right [_, Block ]]
64
62
65
63
// mined with mantis + ethminer
@@ -74,8 +72,7 @@ class BlockGeneratorSpec extends FlatSpec with Matchers with PropertyChecks with
74
72
val res = ledger.importBlock(fullBlock.right.get)
75
73
76
74
// Create new pending block, with updated stateRootHash
77
- val result1 : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(
78
- blockchain.getBestBlock(), Seq (signedTransaction), Address (testAddress), blockGenerator.emptyX)
75
+ val result1 : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(blockchain.getBestBlock(), Seq (signedTransaction), Address (testAddress), blockGenerator.emptyX)
79
76
result1 shouldBe a[Right [_, Block ]]
80
77
81
78
val pendBlockAndState = blockGenerator.getPendingBlockAndState.get
@@ -93,8 +90,7 @@ class BlockGeneratorSpec extends FlatSpec with Matchers with PropertyChecks with
93
90
}
94
91
95
92
it should " filter out failing transactions" in new TestSetup {
96
- val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(
97
- bestBlock, Seq (signedTransaction, duplicatedSignedTransaction), Address (testAddress), blockGenerator.emptyX)
93
+ val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(bestBlock, Seq (signedTransaction, duplicatedSignedTransaction), Address (testAddress), blockGenerator.emptyX)
98
94
result shouldBe a[Right [_, Block ]]
99
95
100
96
// mined with mantis + ethminer
@@ -117,8 +113,7 @@ class BlockGeneratorSpec extends FlatSpec with Matchers with PropertyChecks with
117
113
nonce = signedTransaction.tx.nonce + 1 ),
118
114
keyPair, Some (0x3d .toByte))
119
115
120
- val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(
121
- bestBlock, Seq (txWitGasTooBigGasLimit, signedTransaction, duplicatedSignedTransaction), Address (testAddress), blockGenerator.emptyX)
116
+ val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(bestBlock, Seq (txWitGasTooBigGasLimit, signedTransaction, duplicatedSignedTransaction), Address (testAddress), blockGenerator.emptyX)
122
117
result shouldBe a[Right [_, Block ]]
123
118
124
119
// mined with mantis + ethminer
@@ -160,8 +155,7 @@ class BlockGeneratorSpec extends FlatSpec with Matchers with PropertyChecks with
160
155
val generalTx = SignedTransaction .sign(transaction, keyPair, None )
161
156
val specificTx = SignedTransaction .sign(transaction.copy(nonce = transaction.nonce + 1 ), keyPair, Some (0x3d .toByte))
162
157
163
- val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(
164
- bestBlock, Seq (generalTx, specificTx), Address (testAddress), blockGenerator.emptyX)
158
+ val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(bestBlock, Seq (generalTx, specificTx), Address (testAddress), blockGenerator.emptyX)
165
159
result shouldBe a[Right [_, Block ]]
166
160
167
161
// mined with mantis + ethminer
@@ -180,8 +174,7 @@ class BlockGeneratorSpec extends FlatSpec with Matchers with PropertyChecks with
180
174
it should " generate block after eip155 and allow both chain specific and general transactions" in new TestSetup {
181
175
val generalTx : SignedTransaction = SignedTransaction .sign(transaction.copy(nonce = transaction.nonce + 1 ), keyPair, None )
182
176
183
- val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(
184
- bestBlock, Seq (generalTx, signedTransaction), Address (testAddress), blockGenerator.emptyX)
177
+ val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(bestBlock, Seq (generalTx, signedTransaction), Address (testAddress), blockGenerator.emptyX)
185
178
result shouldBe a[Right [_, Block ]]
186
179
187
180
// mined with mantis + ethminer
@@ -200,8 +193,7 @@ class BlockGeneratorSpec extends FlatSpec with Matchers with PropertyChecks with
200
193
it should " include consecutive transactions from single sender" in new TestSetup {
201
194
val nextTransaction : SignedTransaction = SignedTransaction .sign(transaction.copy(nonce = signedTransaction.tx.nonce + 1 ), keyPair, Some (0x3d .toByte))
202
195
203
- val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(
204
- bestBlock, Seq (nextTransaction, signedTransaction), Address (testAddress), blockGenerator.emptyX)
196
+ val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(bestBlock, Seq (nextTransaction, signedTransaction), Address (testAddress), blockGenerator.emptyX)
205
197
result shouldBe a[Right [_, Block ]]
206
198
207
199
// mined with mantis + ethminer
@@ -232,9 +224,7 @@ class BlockGeneratorSpec extends FlatSpec with Matchers with PropertyChecks with
232
224
val signedFailingTransaction : SignedTransaction = SignedTransaction .sign(failingTransaction,
233
225
keyPairFromPrvKey(privateKeyWithNoEthere), Some (0x3d .toByte))
234
226
235
- val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(
236
- bestBlock, Seq (nextTransaction, signedFailingTransaction, signedTransaction),
237
- Address (testAddress), blockGenerator.emptyX)
227
+ val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(bestBlock, Seq (nextTransaction, signedFailingTransaction, signedTransaction), Address (testAddress), blockGenerator.emptyX)
238
228
result shouldBe a[Right [_, Block ]]
239
229
240
230
// mined with mantis + ethminer
@@ -256,8 +246,7 @@ class BlockGeneratorSpec extends FlatSpec with Matchers with PropertyChecks with
256
246
keyPair,
257
247
Some (0x3d .toByte))
258
248
259
- val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(
260
- bestBlock, Seq (txWitSameNonceButLowerGasPrice, signedTransaction), Address (testAddress), blockGenerator.emptyX)
249
+ val result : Either [BlockPreparationError , PendingBlock ] = blockGenerator.generateBlock(bestBlock, Seq (txWitSameNonceButLowerGasPrice, signedTransaction), Address (testAddress), blockGenerator.emptyX)
261
250
result shouldBe a[Right [_, Block ]]
262
251
263
252
// mined with mantis + ethminer
0 commit comments