mirror of
https://github.com/corda/corda.git
synced 2025-02-21 17:56:54 +00:00
Take out the fake signing delay in the trader demo.
This commit is contained in:
parent
139bf1e450
commit
3533e87953
@ -12,7 +12,6 @@ import co.paralleluniverse.fibers.Suspendable
|
|||||||
import com.google.common.net.HostAndPort
|
import com.google.common.net.HostAndPort
|
||||||
import contracts.CommercialPaper
|
import contracts.CommercialPaper
|
||||||
import core.*
|
import core.*
|
||||||
import core.crypto.DigitalSignature
|
|
||||||
import core.crypto.SecureHash
|
import core.crypto.SecureHash
|
||||||
import core.crypto.generateKeyPair
|
import core.crypto.generateKeyPair
|
||||||
import core.messaging.LegallyIdentifiableNode
|
import core.messaging.LegallyIdentifiableNode
|
||||||
@ -230,16 +229,8 @@ class TraderDemoProtocolSeller(val myAddress: HostAndPort,
|
|||||||
|
|
||||||
progressTracker.currentStep = TRADING
|
progressTracker.currentStep = TRADING
|
||||||
|
|
||||||
val seller = object : TwoPartyTradeProtocol.Seller(otherSide, tsa, commercialPaper, 1000.DOLLARS,
|
val seller = TwoPartyTradeProtocol.Seller(otherSide, tsa, commercialPaper, 1000.DOLLARS, cpOwnerKey, sessionID,
|
||||||
cpOwnerKey, sessionID, progressTracker.childrenFor[TRADING]!!) {
|
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 tradeTX: SignedTransaction = subProtocol(seller)
|
val tradeTX: SignedTransaction = subProtocol(seller)
|
||||||
|
|
||||||
logger.info("Sale completed - we have a happy customer!\n\nFinal transaction is:\n\n${Emoji.renderIfSupported(tradeTX.tx)}")
|
logger.info("Sale completed - we have a happy customer!\n\nFinal transaction is:\n\n${Emoji.renderIfSupported(tradeTX.tx)}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user