Minor: fix a typo in a variable name, spotted by Rick

This commit is contained in:
Mike Hearn 2016-03-30 18:47:23 +02:00
parent 3adfd02e31
commit 420ecf80a0
5 changed files with 11 additions and 12 deletions

View File

@ -72,7 +72,7 @@ abstract class AbstractNode(val dir: Path, val configuration: NodeConfiguration,
override val clock: Clock get() = platformClock
}
val legallyIdentifableAddress: LegallyIdentifiableNode by lazy {
val legallyIdentifiableAddress: LegallyIdentifiableNode by lazy {
LegallyIdentifiableNode(net.myAddress, storage.myLegalIdentity, findMyLocation())
}

View File

@ -132,7 +132,7 @@ class MockNetwork(private val threadPerNode: Boolean = false,
*/
fun createTwoNodes(nodeFactory: Factory = defaultFactory): Pair<MockNode, MockNode> {
require(nodes.isEmpty())
return Pair(createNode(null, -1, nodeFactory), createNode(nodes[0].legallyIdentifableAddress, -1, nodeFactory))
return Pair(createNode(null, -1, nodeFactory), createNode(nodes[0].legallyIdentifiableAddress, -1, nodeFactory))
}
fun addressToNode(address: SingleMessageRecipient): MockNode = nodes.single { it.net.myAddress == address }

View File

@ -104,7 +104,7 @@ class AttachmentTests {
}
}
})
val n1 = network.createNode(n0.legallyIdentifableAddress)
val n1 = network.createNode(n0.legallyIdentifiableAddress)
// Insert an attachment into node zero's store directly.
val id = n0.storage.attachments.importAttachment(ByteArrayInputStream(fakeAttachment()))

View File

@ -66,7 +66,7 @@ class TwoPartyTradeProtocolTests : TestWithInMemoryNetwork() {
transactionGroupFor<ContractState> {
val (aliceNode, bobNode) = net.createTwoNodes()
(bobNode.wallet as NodeWalletService).fillWithSomeTestCash(2000.DOLLARS)
val alicesFakePaper = fillUpForSeller(false, aliceNode.legallyIdentifableAddress.identity, null).second
val alicesFakePaper = fillUpForSeller(false, aliceNode.legallyIdentifiableAddress.identity, null).second
insertFakeTransactions(alicesFakePaper, aliceNode.services, aliceNode.storage.myLegalIdentityKey)
@ -74,7 +74,7 @@ class TwoPartyTradeProtocolTests : TestWithInMemoryNetwork() {
val aliceResult = TwoPartyTradeProtocol.runSeller(
aliceNode.smm,
aliceNode.legallyIdentifableAddress,
aliceNode.legallyIdentifiableAddress,
bobNode.net.myAddress,
lookup("alice's paper"),
1000.DOLLARS,
@ -83,7 +83,7 @@ class TwoPartyTradeProtocolTests : TestWithInMemoryNetwork() {
)
val bobResult = TwoPartyTradeProtocol.runBuyer(
bobNode.smm,
aliceNode.legallyIdentifableAddress,
aliceNode.legallyIdentifiableAddress,
aliceNode.net.myAddress,
1000.DOLLARS,
CommercialPaper.State::class.java,
@ -105,7 +105,7 @@ class TwoPartyTradeProtocolTests : TestWithInMemoryNetwork() {
var (aliceNode, bobNode) = net.createTwoNodes()
val aliceAddr = aliceNode.net.myAddress
val bobAddr = bobNode.net.myAddress as InMemoryMessagingNetwork.Handle
val timestamperAddr = aliceNode.legallyIdentifableAddress
val timestamperAddr = aliceNode.legallyIdentifiableAddress
(bobNode.wallet as NodeWalletService).fillWithSomeTestCash(2000.DOLLARS)
val alicesFakePaper = fillUpForSeller(false, timestamperAddr.identity, null).second
@ -213,7 +213,7 @@ class TwoPartyTradeProtocolTests : TestWithInMemoryNetwork() {
fun checkDependenciesOfSaleAssetAreResolved() {
transactionGroupFor<ContractState> {
val aliceNode = makeNodeWithTracking("alice")
val timestamperAddr = aliceNode.legallyIdentifableAddress
val timestamperAddr = aliceNode.legallyIdentifiableAddress
val bobNode = makeNodeWithTracking("bob")
// Insert a prospectus type attachment into the commercial paper transaction.
@ -324,7 +324,7 @@ class TwoPartyTradeProtocolTests : TestWithInMemoryNetwork() {
var (aliceNode, bobNode) = net.createTwoNodes()
val aliceAddr = aliceNode.net.myAddress
val bobAddr = bobNode.net.myAddress as InMemoryMessagingNetwork.Handle
val timestamperAddr = aliceNode.legallyIdentifableAddress
val timestamperAddr = aliceNode.legallyIdentifiableAddress
val bobKey = bobNode.keyManagement.freshKey()
val bobsBadCash = fillUpForBuyer(bobError, bobKey.public).second

View File

@ -9,12 +9,11 @@
package core.node.services
import contracts.Cash
import core.*
import core.testing.MockNetwork
import core.DOLLARS
import core.Fix
import core.TransactionBuilder
import core.bd
import core.testing.MockNetwork
import core.testutils.*
import core.utilities.BriefLogFormatter
import org.junit.Test
@ -86,7 +85,7 @@ class NodeInterestRatesTest {
val tx = TransactionBuilder()
val fixOf = NodeInterestRates.parseFixOf("LIBOR 2016-03-16 1M")
val protocol = RatesFixProtocol(tx, n2.legallyIdentifableAddress, fixOf, "0.675".bd, "0.1".bd)
val protocol = RatesFixProtocol(tx, n2.legallyIdentifiableAddress, fixOf, "0.675".bd, "0.1".bd)
BriefLogFormatter.initVerbose("rates")
val future = n1.smm.add("rates", protocol)