mirror of
https://github.com/corda/corda.git
synced 2025-02-20 17:33:15 +00:00
Changed transaction notes type DB from 'blob' to 'text'
This commit is contained in:
parent
2ce310050e
commit
96007cd777
@ -46,10 +46,10 @@ class NodeVaultService(private val services: ServiceHub) : SingletonSerializeAsT
|
||||
|
||||
private object TransactionNotesTable : JDBCHashedTable("${NODE_DATABASE_PREFIX}vault_txn_notes") {
|
||||
val txnId = secureHash("txnId")
|
||||
val notes = blob("notes")
|
||||
val notes = text("notes")
|
||||
}
|
||||
|
||||
private val mutex = ThreadBox(object {
|
||||
private val mutex = ThreadBox(content = object {
|
||||
val unconsumedStates = object : AbstractJDBCHashSet<StateRef, StatesSetTable>(StatesSetTable) {
|
||||
override fun elementFromRow(row: ResultRow): StateRef = StateRef(row[table.stateRef.txId], row[table.stateRef.index])
|
||||
|
||||
@ -65,7 +65,7 @@ class NodeVaultService(private val services: ServiceHub) : SingletonSerializeAsT
|
||||
}
|
||||
|
||||
override fun valueFromRow(row: ResultRow): Set<String> {
|
||||
return deserializeFromBlob(row[table.notes])
|
||||
return row[table.notes].split(delimiters = ";").toSet()
|
||||
}
|
||||
|
||||
override fun addKeyToInsert(insert: InsertStatement, entry: Map.Entry<SecureHash, Set<String>>, finalizables: MutableList<() -> Unit>) {
|
||||
@ -73,7 +73,7 @@ class NodeVaultService(private val services: ServiceHub) : SingletonSerializeAsT
|
||||
}
|
||||
|
||||
override fun addValueToInsert(insert: InsertStatement, entry: Map.Entry<SecureHash, Set<String>>, finalizables: MutableList<() -> Unit>) {
|
||||
insert[table.notes] = serializeToBlob(entry.value, finalizables)
|
||||
insert[table.notes] = entry.value.joinToString(separator = ";")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,6 @@ import com.r3corda.core.node.services.VaultService
|
||||
import com.r3corda.core.transactions.SignedTransaction
|
||||
import com.r3corda.core.utilities.DUMMY_NOTARY
|
||||
import com.r3corda.core.utilities.LogHelper
|
||||
import com.r3corda.node.services.schema.NodeSchemaService
|
||||
import com.r3corda.node.services.vault.NodeVaultService
|
||||
import com.r3corda.node.utilities.configureDatabase
|
||||
import com.r3corda.node.utilities.databaseTransaction
|
||||
|
Loading…
x
Reference in New Issue
Block a user