Skip to content

Commit d0f977a

Browse files
authored
[FIX] Fix NPE thrown during cake building (#813)
1 parent adfa1f2 commit d0f977a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/main/scala/io/iohk/ethereum/consensus/ConsensusBuilder.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ trait StdConsensusBuilder extends ConsensusBuilder {
5555
config.protocol match {
5656
case Protocol.Ethash | Protocol.MockedPow | Protocol.RestrictedEthash => buildEthashConsensus()
5757
}
58+
5859
log.info(s"Using '${protocol.name}' consensus [${consensus.getClass.getName}]")
5960

6061
consensus

src/main/scala/io/iohk/ethereum/nodebuilder/NodeBuilder.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ trait TransactionHistoryServiceBuilder {
285285
object TransactionHistoryServiceBuilder {
286286
trait Default extends TransactionHistoryServiceBuilder {
287287
self: BlockchainBuilder with PendingTransactionsManagerBuilder with TxPoolConfigBuilder =>
288-
val transactionHistoryService =
288+
lazy val transactionHistoryService =
289289
new TransactionHistoryService(blockchain, pendingTransactionsManager, txPoolConfig.getTransactionFromPoolTimeout)
290290
}
291291
}
@@ -351,7 +351,7 @@ trait EthServiceBuilder {
351351
with JSONRpcConfigBuilder
352352
with AsyncConfigBuilder =>
353353

354-
val ethService = new EthService(
354+
lazy val ethService = new EthService(
355355
blockchain,
356356
ledger,
357357
stxLedger,

src/test/scala/io/iohk/ethereum/jsonrpc/MantisServiceSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class MantisServiceSpec
6767
)
6868
)
6969

70-
override val transactionHistoryService: TransactionHistoryService =
70+
override lazy val transactionHistoryService: TransactionHistoryService =
7171
new TransactionHistoryService(
7272
blockchain,
7373
pendingTransactionsManager,

0 commit comments

Comments
 (0)