mirror of
https://github.com/corda/corda.git
synced 2024-12-20 05:28:21 +00:00
Fixed merge conflict problems.
This commit is contained in:
parent
5bf5e37572
commit
68867d21bb
@ -72,8 +72,6 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
fun runTraderDemo(args: Array<String>): Int {
|
fun runTraderDemo(args: Array<String>): Int {
|
||||||
val cashIssuerKey = generateKeyPair()
|
val cashIssuerKey = generateKeyPair()
|
||||||
val cashIssuer = Party("Trusted cash issuer", cashIssuerKey.public)
|
|
||||||
val amount = 1000.DOLLARS `issued by` cashIssuer.ref(1)
|
|
||||||
val parser = OptionParser()
|
val parser = OptionParser()
|
||||||
|
|
||||||
val roleArg = parser.accepts("role").withRequiredArg().ofType(Role::class.java).required()
|
val roleArg = parser.accepts("role").withRequiredArg().ofType(Role::class.java).required()
|
||||||
@ -142,11 +140,17 @@ fun runTraderDemo(args: Array<String>): Int {
|
|||||||
cashIssuer = party
|
cashIssuer = party
|
||||||
NodeInfo(ArtemisMessagingService.makeRecipient(theirNetAddr), party, setOf(NetworkMapService.Type))
|
NodeInfo(ArtemisMessagingService.makeRecipient(theirNetAddr), party, setOf(NetworkMapService.Type))
|
||||||
}
|
}
|
||||||
|
|
||||||
// And now construct then start the node object. It takes a little while.
|
// And now construct then start the node object. It takes a little while.
|
||||||
val node = logElapsedTime("Node startup") {
|
val node = logElapsedTime("Node startup") {
|
||||||
Node(directory, myNetAddr, config, networkMapId, advertisedServices).setup().start()
|
Node(directory, myNetAddr, config, networkMapId, advertisedServices).setup().start()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Replace with a separate trusted cash issuer
|
||||||
|
if (cashIssuer == null) {
|
||||||
|
cashIssuer = node.services.storageService.myLegalIdentity
|
||||||
|
}
|
||||||
|
|
||||||
// What happens next depends on the role. The buyer sits around waiting for a trade to start. The seller role
|
// What happens next depends on the role. The buyer sits around waiting for a trade to start. The seller role
|
||||||
// will contact the buyer and actually make something happen.
|
// will contact the buyer and actually make something happen.
|
||||||
val amount = 1000.DOLLARS `issued by` cashIssuer.ref(0) // Note: "0" has to match the reference used in the wallet filler
|
val amount = 1000.DOLLARS `issued by` cashIssuer.ref(0) // Note: "0" has to match the reference used in the wallet filler
|
||||||
@ -367,7 +371,7 @@ private class TraderDemoProtocolSeller(val myAddress: HostAndPort,
|
|||||||
|
|
||||||
// Now make a dummy transaction that moves it to a new key, just to show that resolving dependencies works.
|
// Now make a dummy transaction that moves it to a new key, just to show that resolving dependencies works.
|
||||||
val move: SignedTransaction = run {
|
val move: SignedTransaction = run {
|
||||||
val builder = TransactionBuilder()
|
val builder = TransactionType.General.Builder()
|
||||||
CommercialPaper().generateMove(builder, issuance.tx.outRef(0), ownedBy)
|
CommercialPaper().generateMove(builder, issuance.tx.outRef(0), ownedBy)
|
||||||
builder.signWith(keyPair)
|
builder.signWith(keyPair)
|
||||||
val notarySignature = subProtocol(NotaryProtocol.Client(builder.toSignedTransaction(false)))
|
val notarySignature = subProtocol(NotaryProtocol.Client(builder.toSignedTransaction(false)))
|
||||||
|
Loading…
Reference in New Issue
Block a user