Skip to content
This repository has been archived by the owner on Jan 29, 2019. It is now read-only.

Commit

Permalink
#72 Realtime chain reorganisation. Renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
arturalbov authored and hleb-albau committed Apr 6, 2018
1 parent a26e01c commit d7ae7bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ interface BlockBundleEventGenerator<T : BlockBundle> {
fun generate(blockBundle: T, history: StackCache<T>): List<Pair<PumpEvent, T>>
}

private val log = LoggerFactory.getLogger(CommonBlockBundleEventGenerator::class.java)!!
private val log = LoggerFactory.getLogger(ChainReorganizationBlockBundleEventGenerator::class.java)!!

@Component
class CommonBlockBundleEventGenerator<T : BlockBundle>(
class ChainReorganizationBlockBundleEventGenerator<T : BlockBundle>(
private val blockchainInterface: FlowableBlockchainInterface<T>,
monitoring: MeterRegistry
) : BlockBundleEventGenerator<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class BlockBundleEventGeneratorTest {
history.push(blockB)
history.push(blockC)

val blockBundleMapper = CommonBlockBundleEventGenerator<TestBlockBundle>(mock(), SimpleMeterRegistry())
val blockBundleMapper = ChainReorganizationBlockBundleEventGenerator<TestBlockBundle>(mock(), SimpleMeterRegistry())


val result = blockBundleMapper.generate(blockD, history)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d7ae7bf

Please sign in to comment.