mirror of
https://github.com/corda/corda.git
synced 2025-01-18 02:39:51 +00:00
Minor: fix some compiler warnings
This commit is contained in:
parent
506441977f
commit
81c698a260
@ -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()
|
||||
}
|
||||
}
|
@ -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
|
||||
|
@ -285,8 +285,8 @@ class NodeRegistration(val node: NodeInfo, val serial: Long, val type: AddOrRemo
|
||||
*/
|
||||
class WireNodeRegistration(raw: SerializedBytes<NodeRegistration>, sig: DigitalSignature.WithKey) : SignedData<NodeRegistration>(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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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?,
|
||||
|
Loading…
Reference in New Issue
Block a user