From 958c7f8c9f08b14a58818290eb31b3e2558999f0 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Fri, 26 Aug 2016 15:30:10 +0200 Subject: [PATCH 1/3] Give the trader demo buyer lots more cash. --- src/main/kotlin/com/r3corda/demos/TraderDemo.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/r3corda/demos/TraderDemo.kt b/src/main/kotlin/com/r3corda/demos/TraderDemo.kt index 4bf342cfd5..108bfd3a2e 100644 --- a/src/main/kotlin/com/r3corda/demos/TraderDemo.kt +++ b/src/main/kotlin/com/r3corda/demos/TraderDemo.kt @@ -205,7 +205,7 @@ private fun runBuyer(node: Node, amount: Amount) { // Self issue some cash. // // TODO: At some point this demo should be extended to have a central bank node. - node.services.fillWithSomeTestCash(3000.DOLLARS, + node.services.fillWithSomeTestCash(300000.DOLLARS, outputNotary = node.info.identity, // In this demo, the buyer and notary are the same. ownedBy = node.services.keyManagementService.freshKey().public) From 2d40c7e6dc3956dffb2f2dd464eb8b4866103f8b Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Fri, 2 Sep 2016 16:54:01 +0200 Subject: [PATCH 2/3] Minor: make the logger in the standalone node private to avoid accidental screwups due to name conflicts (mental or read) --- node/src/main/kotlin/com/r3corda/node/Main.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/src/main/kotlin/com/r3corda/node/Main.kt b/node/src/main/kotlin/com/r3corda/node/Main.kt index 52d1392254..72ca45b14b 100644 --- a/node/src/main/kotlin/com/r3corda/node/Main.kt +++ b/node/src/main/kotlin/com/r3corda/node/Main.kt @@ -9,7 +9,7 @@ import java.net.InetAddress import java.nio.file.Path import java.nio.file.Paths -val log = LoggerFactory.getLogger("Main") +private val log = LoggerFactory.getLogger("Main") object ParamsSpec { val parser = OptionParser() From 86267e880df385ab662308e192ae283c5e67e9b2 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Thu, 1 Sep 2016 20:36:48 +0200 Subject: [PATCH 3/3] Minor: add a log.debug {} utility same as log.trace {} to do lazy message construction --- core/src/main/kotlin/com/r3corda/core/utilities/Logging.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/main/kotlin/com/r3corda/core/utilities/Logging.kt b/core/src/main/kotlin/com/r3corda/core/utilities/Logging.kt index ebb5f743ae..2acbb4729e 100644 --- a/core/src/main/kotlin/com/r3corda/core/utilities/Logging.kt +++ b/core/src/main/kotlin/com/r3corda/core/utilities/Logging.kt @@ -13,9 +13,8 @@ import kotlin.reflect.KClass // logging at that level is enabled. inline fun loggerFor(): org.slf4j.Logger = LoggerFactory.getLogger(T::class.java) -inline fun org.slf4j.Logger.trace(msg: () -> String) { - if (isTraceEnabled) trace(msg()) -} +inline fun org.slf4j.Logger.trace(msg: () -> String) { if (isTraceEnabled) trace(msg()) } +inline fun org.slf4j.Logger.debug(msg: () -> String) { if (isDebugEnabled) debug(msg()) } /** A configuration helper that allows modifying the log level for specific loggers */ object LogHelper {