From 3533e879537c9996c950ebe73a43495adc3033b3 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Fri, 11 Mar 2016 18:12:18 +0100 Subject: [PATCH] Take out the fake signing delay in the trader demo. --- src/main/kotlin/demos/TraderDemo.kt | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/main/kotlin/demos/TraderDemo.kt b/src/main/kotlin/demos/TraderDemo.kt index f16327d052..a99ac5e2d5 100644 --- a/src/main/kotlin/demos/TraderDemo.kt +++ b/src/main/kotlin/demos/TraderDemo.kt @@ -12,7 +12,6 @@ import co.paralleluniverse.fibers.Suspendable import com.google.common.net.HostAndPort import contracts.CommercialPaper import core.* -import core.crypto.DigitalSignature import core.crypto.SecureHash import core.crypto.generateKeyPair import core.messaging.LegallyIdentifiableNode @@ -230,16 +229,8 @@ class TraderDemoProtocolSeller(val myAddress: HostAndPort, progressTracker.currentStep = TRADING - val seller = object : TwoPartyTradeProtocol.Seller(otherSide, tsa, commercialPaper, 1000.DOLLARS, - cpOwnerKey, sessionID, progressTracker.childrenFor[TRADING]!!) { - override fun signWithOurKey(partialTX: SignedTransaction): DigitalSignature.WithKey { - val s = super.signWithOurKey(partialTX) - // Fake delay to make it look like we're doing something more intensive than we really are, to show - // the progress tracking framework. - Thread.sleep(2000) - return s - } - } + val seller = TwoPartyTradeProtocol.Seller(otherSide, tsa, commercialPaper, 1000.DOLLARS, cpOwnerKey, sessionID, + progressTracker.childrenFor[TRADING]!!) val tradeTX: SignedTransaction = subProtocol(seller) logger.info("Sale completed - we have a happy customer!\n\nFinal transaction is:\n\n${Emoji.renderIfSupported(tradeTX.tx)}")