mirror of
https://github.com/corda/corda.git
synced 2024-12-20 21:43:14 +00:00
Merge pull request #1905 from corda/kat/feature/addEnterpriseAMQPIdentifier
Corda-725 - Change AMQP identifier
This commit is contained in:
commit
cbc4003032
@ -65,6 +65,8 @@ UNRELEASED
|
|||||||
* A new function ``checkCommandVisibility(publicKey: PublicKey)`` has been added to ``FilteredTransaction`` to check
|
* A new function ``checkCommandVisibility(publicKey: PublicKey)`` has been added to ``FilteredTransaction`` to check
|
||||||
if every command that a signer should receive (e.g. an Oracle) is indeed visible.
|
if every command that a signer should receive (e.g. an Oracle) is indeed visible.
|
||||||
|
|
||||||
|
* Change the AMQP serialiser to use the oficially assigned R3 identifier rather than a placeholder.
|
||||||
|
|
||||||
.. _changelog_v1:
|
.. _changelog_v1:
|
||||||
|
|
||||||
Release 1.0
|
Release 1.0
|
||||||
|
@ -18,8 +18,15 @@ import java.util.*
|
|||||||
import net.corda.nodeapi.internal.serialization.carpenter.Field as CarpenterField
|
import net.corda.nodeapi.internal.serialization.carpenter.Field as CarpenterField
|
||||||
import net.corda.nodeapi.internal.serialization.carpenter.Schema as CarpenterSchema
|
import net.corda.nodeapi.internal.serialization.carpenter.Schema as CarpenterSchema
|
||||||
|
|
||||||
// TODO: get an assigned number as per AMQP spec
|
/**
|
||||||
const val DESCRIPTOR_TOP_32BITS: Long = 0xc0da0000
|
* R3 AMQP assigned enterprise number
|
||||||
|
*
|
||||||
|
* see [here](https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers)
|
||||||
|
*
|
||||||
|
* Repeated here for brevity:
|
||||||
|
* 50530 - R3 - Mike Hearn - mike&r3.com
|
||||||
|
*/
|
||||||
|
const val DESCRIPTOR_TOP_32BITS: Long = 0xc5620000
|
||||||
|
|
||||||
const val DESCRIPTOR_DOMAIN: String = "net.corda"
|
const val DESCRIPTOR_DOMAIN: String = "net.corda"
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ class EvolvabilityTests {
|
|||||||
// data class C (val a: Int, val b: Int)
|
// data class C (val a: Int, val b: Int)
|
||||||
// val sc = SerializationOutput(sf).serialize(C(A, B))
|
// val sc = SerializationOutput(sf).serialize(C(A, B))
|
||||||
// f.writeBytes(sc.bytes)
|
// f.writeBytes(sc.bytes)
|
||||||
|
// println (path)
|
||||||
|
|
||||||
// new version of the class, in this case the order of the parameters has been swapped
|
// new version of the class, in this case the order of the parameters has been swapped
|
||||||
data class C(val b: Int, val a: Int)
|
data class C(val b: Int, val a: Int)
|
||||||
@ -54,6 +55,7 @@ class EvolvabilityTests {
|
|||||||
// data class C (val a: Int, val b: String)
|
// data class C (val a: Int, val b: String)
|
||||||
// val sc = SerializationOutput(sf).serialize(C(A, B))
|
// val sc = SerializationOutput(sf).serialize(C(A, B))
|
||||||
// f.writeBytes(sc.bytes)
|
// f.writeBytes(sc.bytes)
|
||||||
|
// println (path)
|
||||||
|
|
||||||
// new version of the class, in this case the order of the parameters has been swapped
|
// new version of the class, in this case the order of the parameters has been swapped
|
||||||
data class C(val b: String, val a: Int)
|
data class C(val b: String, val a: Int)
|
||||||
@ -78,7 +80,6 @@ class EvolvabilityTests {
|
|||||||
// val sc = SerializationOutput(sf).serialize(C(A))
|
// val sc = SerializationOutput(sf).serialize(C(A))
|
||||||
// f.writeBytes(sc.bytes)
|
// f.writeBytes(sc.bytes)
|
||||||
// println ("Path = $path")
|
// println ("Path = $path")
|
||||||
|
|
||||||
data class C(val a: Int, val b: Int?)
|
data class C(val a: Int, val b: Int?)
|
||||||
|
|
||||||
val sc2 = f.readBytes()
|
val sc2 = f.readBytes()
|
||||||
@ -300,9 +301,6 @@ class EvolvabilityTests {
|
|||||||
val path2 = EvolvabilityTests::class.java.getResource("EvolvabilityTests.multiVersion.2")
|
val path2 = EvolvabilityTests::class.java.getResource("EvolvabilityTests.multiVersion.2")
|
||||||
val path3 = EvolvabilityTests::class.java.getResource("EvolvabilityTests.multiVersion.3")
|
val path3 = EvolvabilityTests::class.java.getResource("EvolvabilityTests.multiVersion.3")
|
||||||
|
|
||||||
@Suppress("UNUSED_VARIABLE")
|
|
||||||
val f = File(path1.toURI())
|
|
||||||
|
|
||||||
val a = 100
|
val a = 100
|
||||||
val b = 200
|
val b = 200
|
||||||
val c = 300
|
val c = 300
|
||||||
@ -312,14 +310,24 @@ class EvolvabilityTests {
|
|||||||
//
|
//
|
||||||
// Version 1:
|
// Version 1:
|
||||||
// data class C (val a: Int, val b: Int)
|
// data class C (val a: Int, val b: Int)
|
||||||
|
//
|
||||||
|
// val scc = SerializationOutput(sf).serialize(C(a, b))
|
||||||
|
// File(path1.toURI()).writeBytes(scc.bytes)
|
||||||
|
// println ("Path = $path1")
|
||||||
|
//
|
||||||
// Version 2 - add param c
|
// Version 2 - add param c
|
||||||
// data class C (val c: Int, val b: Int, val a: Int)
|
// data class C (val c: Int, val b: Int, val a: Int)
|
||||||
|
//
|
||||||
|
// val scc = SerializationOutput(sf).serialize(C(c, b, a))
|
||||||
|
// File(path2.toURI()).writeBytes(scc.bytes)
|
||||||
|
// println ("Path = $path2")
|
||||||
|
//
|
||||||
// Version 3 - add param d
|
// Version 3 - add param d
|
||||||
// data class C (val b: Int, val c: Int, val d: Int, val a: Int)
|
// data class C (val b: Int, val c: Int, val d: Int, val a: Int)
|
||||||
//
|
//
|
||||||
// val scc = SerializationOutput(sf).serialize(C(b, c, d, a))
|
// val scc = SerializationOutput(sf).serialize(C(b, c, d, a))
|
||||||
// f.writeBytes(scc.bytes)
|
// File(path3.toURI()).writeBytes(scc.bytes)
|
||||||
// println ("Path = $path1")
|
// println ("Path = $path3")
|
||||||
|
|
||||||
@Suppress("UNUSED")
|
@Suppress("UNUSED")
|
||||||
data class C(val e: Int, val c: Int, val b: Int, val a: Int, val d: Int) {
|
data class C(val e: Int, val c: Int, val b: Int, val a: Int, val d: Int) {
|
||||||
@ -409,14 +417,24 @@ class EvolvabilityTests {
|
|||||||
//
|
//
|
||||||
// Version 1:
|
// Version 1:
|
||||||
// data class C (val a: Int, val b: Int, val c: Int)
|
// data class C (val a: Int, val b: Int, val c: Int)
|
||||||
|
//
|
||||||
|
// val scc = SerializationOutput(sf).serialize(C(a, b, c))
|
||||||
|
// File(path1.toURI()).writeBytes(scc.bytes)
|
||||||
|
// println ("Path = $path1")
|
||||||
|
//
|
||||||
// Version 2 - add param c
|
// Version 2 - add param c
|
||||||
// data class C (val b: Int, val c: Int, val d: Int, val e: Int)
|
// data class C (val b: Int, val c: Int, val d: Int, val e: Int)
|
||||||
|
//
|
||||||
|
// val scc = SerializationOutput(sf).serialize(C(b, c, d, e))
|
||||||
|
// File(path2.toURI()).writeBytes(scc.bytes)
|
||||||
|
// println ("Path = $path2")
|
||||||
|
//
|
||||||
// Version 3 - add param d
|
// Version 3 - add param d
|
||||||
// data class C (val b: Int, val c: Int, val d: Int, val e: Int, val f: Int)
|
// data class C (val b: Int, val c: Int, val d: Int, val e: Int, val f: Int)
|
||||||
//
|
//
|
||||||
// val scc = SerializationOutput(sf).serialize(C(b, c, d, e, f))
|
// val scc = SerializationOutput(sf).serialize(C(b, c, d, e, f))
|
||||||
// File(path1.toURI()).writeBytes(scc.bytes)
|
// File(path3.toURI()).writeBytes(scc.bytes)
|
||||||
// println ("Path = $path1")
|
// println ("Path = $path3")
|
||||||
|
|
||||||
@Suppress("UNUSED")
|
@Suppress("UNUSED")
|
||||||
data class C(val b: Int, val c: Int, val d: Int, val e: Int, val f: Int, val g: Int) {
|
data class C(val b: Int, val c: Int, val d: Int, val e: Int, val f: Int, val g: Int) {
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user