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

Chain pump fixed #39

Merged
merged 18 commits into from
Dec 28, 2017
Merged

Chain pump fixed #39

merged 18 commits into from
Dec 28, 2017

Conversation

YodaMike
Copy link
Contributor

No description provided.

val fl = ConcurrentPulledBlockchain(blockchain)
val context = ConvertContext(
exHash = "",
history = StackCache(20),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use constants values in such situations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}

fun generateEvents(blockchain: BlockchainInterface<*>, startBlockNumber: Long): Flowable<out BlockchainEvent> {
val fl = ConcurrentPulledBlockchain(blockchain)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to give a more informative name for a variable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}

fun convert(_blockBundle: BlockBundle, context: ConvertContext): List<BlockchainEvent> {
var blockBundle = _blockBundle
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should you refactor this without using "_"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

context.history.push(blockBundle)
events = listOf(CommitBlock(blockBundle))
} else {
var exBl: BlockBundle? = null
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uninformative variable name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

val jsonSerializer = ObjectMapper()
val jsonDeserializer = ObjectMapper()
val jsonSerializer = ObjectMapper().registerKotlinModule()
.registerModule(Jdk8Module())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use own ObjectMapper for each hendler

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@YodaMike YodaMike merged commit 1fdcda7 into master Dec 28, 2017
@YodaMike YodaMike deleted the chain_pump_fixed branch December 28, 2017 17:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants