@@ -18,7 +18,6 @@ import io.iohk.ethereum.network.p2p.messages.PV62.BlockHeaderImplicits._
18
18
import io .iohk .ethereum .utils .BlockchainConfig
19
19
import io .iohk .ethereum .utils .ByteUtils .or
20
20
21
- import scala .collection .immutable
22
21
23
22
/**
24
23
* This is a skeleton for a generic [[io.iohk.ethereum.consensus.blocks.BlockGenerator BlockGenerator ]].
@@ -43,7 +42,8 @@ abstract class BlockGeneratorSkeleton(
43
42
44
43
protected val cache : AtomicReference [List [PendingBlockAndState ]] = new AtomicReference (Nil )
45
44
46
- protected def newBlockBody (transactions : immutable.Seq [SignedTransaction ], ommers : X ): BlockBody
45
+
46
+ protected def newBlockBody (transactions : Seq [SignedTransaction ], ommers : X ): BlockBody
47
47
48
48
protected def defaultPrepareHeader (
49
49
blockNumber : BigInt ,
@@ -111,9 +111,9 @@ abstract class BlockGeneratorSkeleton(
111
111
protected def prepareTransactions (
112
112
transactions : Seq [SignedTransaction ],
113
113
blockGasLimit : BigInt
114
- ): immutable. Seq [SignedTransaction ] = {
114
+ ): Seq [SignedTransaction ] = {
115
115
116
- val sortedTransactions : immutable. Seq [SignedTransaction ] = transactions
116
+ val sortedTransactions : Seq [SignedTransaction ] = transactions
117
117
.groupBy(_.senderAddress).values.toList
118
118
.flatMap { txsFromSender =>
119
119
val ordered = txsFromSender
@@ -133,7 +133,7 @@ abstract class BlockGeneratorSkeleton(
133
133
.reverse
134
134
.flatMap { case (_, txs) => txs }
135
135
136
- val transactionsForBlock : immutable. Seq [SignedTransaction ] = sortedTransactions
136
+ val transactionsForBlock : Seq [SignedTransaction ] = sortedTransactions
137
137
.scanLeft(BigInt (0 ), None : Option [SignedTransaction ]) { case ((accumulatedGas, _), stx) => (accumulatedGas + stx.tx.gasLimit, Some (stx)) }
138
138
.collect { case (gas, Some (stx)) => (gas, stx) }
139
139
.takeWhile { case (gas, _) => gas <= blockGasLimit }
0 commit comments