diff --git a/core/src/test/kotlin/core/crypto/SignedDataTest.kt b/core/src/test/kotlin/core/crypto/SignedDataTest.kt index d1f1ff7f06..0c314c20e6 100644 --- a/core/src/test/kotlin/core/crypto/SignedDataTest.kt +++ b/core/src/test/kotlin/core/crypto/SignedDataTest.kt @@ -25,6 +25,6 @@ class SignedDataTest { val keyPairB = generateKeyPair() val sig = keyPairA.private.signWithECDSA(serialized.bits, keyPairB.public) val wrappedData = SignedData(serialized, sig) - val unwrappedData = wrappedData.verified() + wrappedData.verified() } } \ No newline at end of file diff --git a/src/main/kotlin/core/node/AbstractNode.kt b/src/main/kotlin/core/node/AbstractNode.kt index f10c9667e1..ab2288689f 100644 --- a/src/main/kotlin/core/node/AbstractNode.kt +++ b/src/main/kotlin/core/node/AbstractNode.kt @@ -115,7 +115,7 @@ abstract class AbstractNode(val dir: Path, val configuration: NodeConfiguration, require(initialNetworkMapAddress == null || NetworkMapService.Type in initialNetworkMapAddress.advertisedServices) { "Initial network map address must indicate a node that provides a network map service" } - configureNetworkMapCache(initialNetworkMapAddress) + configureNetworkMapCache() return this } @@ -123,7 +123,7 @@ abstract class AbstractNode(val dir: Path, val configuration: NodeConfiguration, * Register this node with the network map cache, and load network map from a remote service (and register for * updates) if one has been supplied. */ - private fun configureNetworkMapCache(networkMapAddress: NodeInfo?) { + private fun configureNetworkMapCache() { services.networkMapCache.addNode(info) if (initialNetworkMapAddress != null) { // TODO: Return a future so the caller knows these operations may not have completed yet, and can monitor diff --git a/src/main/kotlin/core/node/services/NetworkMapService.kt b/src/main/kotlin/core/node/services/NetworkMapService.kt index 1c0bf5fa01..e81e97ecef 100644 --- a/src/main/kotlin/core/node/services/NetworkMapService.kt +++ b/src/main/kotlin/core/node/services/NetworkMapService.kt @@ -285,8 +285,8 @@ class NodeRegistration(val node: NodeInfo, val serial: Long, val type: AddOrRemo */ class WireNodeRegistration(raw: SerializedBytes, sig: DigitalSignature.WithKey) : SignedData(raw, sig) { @Throws(IllegalArgumentException::class) - override fun verifyData(reg: NodeRegistration) { - require(reg.node.identity.owningKey == sig.by) + override fun verifyData(data: NodeRegistration) { + require(data.node.identity.owningKey == sig.by) } } diff --git a/src/main/kotlin/protocols/TwoPartyDealProtocol.kt b/src/main/kotlin/protocols/TwoPartyDealProtocol.kt index 7880a28113..4928c4cbe3 100644 --- a/src/main/kotlin/protocols/TwoPartyDealProtocol.kt +++ b/src/main/kotlin/protocols/TwoPartyDealProtocol.kt @@ -366,7 +366,6 @@ object TwoPartyDealProtocol { val myName = serviceHub.storageService.myLegalIdentity.name val deal: T = dealToFix.state val myOldParty = deal.parties.single { it.name == myName } - val theirOldParty = deal.parties.single { it.name != myName } @Suppress("UNCHECKED_CAST") val newDeal = deal diff --git a/src/test/kotlin/core/messaging/TwoPartyTradeProtocolTests.kt b/src/test/kotlin/core/messaging/TwoPartyTradeProtocolTests.kt index 8e0a2e2860..47ed58e08d 100644 --- a/src/test/kotlin/core/messaging/TwoPartyTradeProtocolTests.kt +++ b/src/test/kotlin/core/messaging/TwoPartyTradeProtocolTests.kt @@ -188,7 +188,6 @@ class TwoPartyTradeProtocolTests { // Creates a mock node with an overridden storage service that uses a RecordingMap, that lets us test the order // of gets and puts. private fun makeNodeWithTracking(name: String): MockNetwork.MockNode { - val networkMapAddr: NodeInfo? = null // Create a node in the mock network ... return net.createNode(null, nodeFactory = object : MockNetwork.Factory { override fun create(dir: Path, config: NodeConfiguration, network: MockNetwork, networkMapAddr: NodeInfo?,