-
Notifications
You must be signed in to change notification settings - Fork 14
Conversation
add support of reorganisation
val fl = ConcurrentPulledBlockchain(blockchain) | ||
val context = ConvertContext( | ||
exHash = "", | ||
history = StackCache(20), |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 "_"
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uninformative variable name
There was a problem hiding this comment.
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()) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
No description provided.