From d7ae7bff166ed9921158f79b0ef467dfdb608214 Mon Sep 17 00:00:00 2001 From: Artur Albov Date: Fri, 6 Apr 2018 16:39:17 +0300 Subject: [PATCH] #72 Realtime chain reorganisation. Renaming --- .../fund/cyber/pump/common/node/BlockBundleEventGenerator.kt | 4 ++-- .../cyber/pump/common/node/BlockBundleEventGeneratorTest.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pumps/common/src/main/kotlin/fund/cyber/pump/common/node/BlockBundleEventGenerator.kt b/pumps/common/src/main/kotlin/fund/cyber/pump/common/node/BlockBundleEventGenerator.kt index 5d619376..34616d14 100644 --- a/pumps/common/src/main/kotlin/fund/cyber/pump/common/node/BlockBundleEventGenerator.kt +++ b/pumps/common/src/main/kotlin/fund/cyber/pump/common/node/BlockBundleEventGenerator.kt @@ -10,10 +10,10 @@ interface BlockBundleEventGenerator { fun generate(blockBundle: T, history: StackCache): List> } -private val log = LoggerFactory.getLogger(CommonBlockBundleEventGenerator::class.java)!! +private val log = LoggerFactory.getLogger(ChainReorganizationBlockBundleEventGenerator::class.java)!! @Component -class CommonBlockBundleEventGenerator( +class ChainReorganizationBlockBundleEventGenerator( private val blockchainInterface: FlowableBlockchainInterface, monitoring: MeterRegistry ) : BlockBundleEventGenerator { diff --git a/pumps/common/src/test/kotlin/fund/cyber/pump/common/node/BlockBundleEventGeneratorTest.kt b/pumps/common/src/test/kotlin/fund/cyber/pump/common/node/BlockBundleEventGeneratorTest.kt index bef3fb21..868dd539 100644 --- a/pumps/common/src/test/kotlin/fund/cyber/pump/common/node/BlockBundleEventGeneratorTest.kt +++ b/pumps/common/src/test/kotlin/fund/cyber/pump/common/node/BlockBundleEventGeneratorTest.kt @@ -29,7 +29,7 @@ class BlockBundleEventGeneratorTest { history.push(blockB) history.push(blockC) - val blockBundleMapper = CommonBlockBundleEventGenerator(mock(), SimpleMeterRegistry()) + val blockBundleMapper = ChainReorganizationBlockBundleEventGenerator(mock(), SimpleMeterRegistry()) val result = blockBundleMapper.generate(blockD, history) @@ -68,7 +68,7 @@ class BlockBundleEventGeneratorTest { on { blockBundleByNumber(5) }.thenReturn(blockH) } - val blockBundleMapper = CommonBlockBundleEventGenerator(blockchainInterface, SimpleMeterRegistry()) + val blockBundleMapper = ChainReorganizationBlockBundleEventGenerator(blockchainInterface, SimpleMeterRegistry()) val result = blockBundleMapper.generate(blockK, history)