mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
* fix several elements associated with the same key bug (#1625)
* Also make the simulation wait for network map to prevent null pointer when getting notary.
This commit is contained in:
parent
798f851def
commit
7ba8576326
@ -54,7 +54,7 @@ data class PartiallyResolvedTransaction(
|
||||
class TransactionDataModel {
|
||||
private val transactions by observable(NodeMonitorModel::transactions)
|
||||
private val collectedTransactions = transactions.recordInSequence()
|
||||
private val transactionMap = collectedTransactions.associateBy(SignedTransaction::id)
|
||||
private val transactionMap = transactions.recordAsAssociation(SignedTransaction::id)
|
||||
|
||||
val partiallyResolvedTransactions = collectedTransactions.map {
|
||||
PartiallyResolvedTransaction.fromSignedTransaction(it, transactionMap)
|
||||
|
@ -131,6 +131,11 @@ class ExplorerSimulation(val options: OptionSet) {
|
||||
bobNode.nodeInfo.legalIdentities.first() to bobRPC,
|
||||
issuerNodeGBP.nodeInfo.legalIdentities.first() to issuerRPCGBP,
|
||||
issuerNodeUSD.nodeInfo.legalIdentities.first() to issuerRPCUSD))
|
||||
|
||||
aliceRPC.waitUntilNetworkReady()
|
||||
bobRPC.waitUntilNetworkReady()
|
||||
issuerRPCGBP.waitUntilNetworkReady()
|
||||
issuerRPCUSD.waitUntilNetworkReady()
|
||||
}
|
||||
|
||||
private fun startSimulation(eventGenerator: EventGenerator, maxIterations: Int) {
|
||||
@ -145,7 +150,7 @@ class ExplorerSimulation(val options: OptionSet) {
|
||||
}
|
||||
|
||||
for (i in 0..maxIterations) {
|
||||
Thread.sleep(300)
|
||||
Thread.sleep(1000)
|
||||
// Issuer requests.
|
||||
eventGenerator.issuerGenerator.map { request ->
|
||||
when (request) {
|
||||
|
Loading…
Reference in New Issue
Block a user