From 744f2c658a828aa8ffcec4ea4a62f9ca75665e20 Mon Sep 17 00:00:00 2001 From: josecoll Date: Mon, 16 Oct 2017 17:35:55 +0100 Subject: [PATCH] Explicitly set length of key hash to 64. --- core/src/main/kotlin/net/corda/core/schemas/NodeInfoSchema.kt | 2 +- .../corda/node/services/keys/PersistentKeyManagementService.kt | 2 +- .../corda/node/services/network/PersistentNetworkMapService.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/kotlin/net/corda/core/schemas/NodeInfoSchema.kt b/core/src/main/kotlin/net/corda/core/schemas/NodeInfoSchema.kt index 8c014cb9a5..c0e2d57c11 100644 --- a/core/src/main/kotlin/net/corda/core/schemas/NodeInfoSchema.kt +++ b/core/src/main/kotlin/net/corda/core/schemas/NodeInfoSchema.kt @@ -85,7 +85,7 @@ object NodeInfoSchemaV1 : MappedSchema( @Table(name = "node_info_party_cert") data class DBPartyAndCertificate( @Id - @Column(name = "owning_key_hash") + @Column(name = "owning_key_hash", length = 64) val owningKeyHash: String, //@Id // TODO Do we assume that names are unique? Note: We can't have it as Id, because our toString on X500 is inconsistent. diff --git a/node/src/main/kotlin/net/corda/node/services/keys/PersistentKeyManagementService.kt b/node/src/main/kotlin/net/corda/node/services/keys/PersistentKeyManagementService.kt index c1957696ab..9e41ddff52 100644 --- a/node/src/main/kotlin/net/corda/node/services/keys/PersistentKeyManagementService.kt +++ b/node/src/main/kotlin/net/corda/node/services/keys/PersistentKeyManagementService.kt @@ -36,7 +36,7 @@ class PersistentKeyManagementService(val identityService: IdentityService, @javax.persistence.Table(name = "${NODE_DATABASE_PREFIX}our_key_pairs") class PersistentKey( @Id - @Column(name = "public_key_hash") + @Column(name = "public_key_hash", length = 64) var publicKeyHash: String, @Lob diff --git a/node/src/main/kotlin/net/corda/node/services/network/PersistentNetworkMapService.kt b/node/src/main/kotlin/net/corda/node/services/network/PersistentNetworkMapService.kt index 8dcce158ac..073b1ea0ac 100644 --- a/node/src/main/kotlin/net/corda/node/services/network/PersistentNetworkMapService.kt +++ b/node/src/main/kotlin/net/corda/node/services/network/PersistentNetworkMapService.kt @@ -32,7 +32,7 @@ class PersistentNetworkMapService(network: MessagingService, networkMapCache: Ne @Table(name = "${NODE_DATABASE_PREFIX}network_map_nodes") class NetworkNode( @Id - @Column(name = "node_party_key_hash") + @Column(name = "node_party_key_hash", length = 64) var publicKeyHash: String, @Column