Skip to content

Commit

Permalink
CORE-16860 Add counterparty info request and response events (#1256)
Browse files Browse the repository at this point in the history
Adds counterparty info request and response events, and removes unneeded flow events and states.

The session changes introduced in 5.1 mean that it is possible to request counterparty information before the counterparty is aware the flow exists and has started its initiated flow. This change allows the act of requesting counterparty information to start the initiated flow if required.

---------

Co-authored-by: James Higgs <[email protected]>
  • Loading branch information
LWogan and JamesHR3 authored Sep 21, 2023
1 parent 55b4afc commit 28ffabb
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"name": "payload",
"type": [
"net.corda.data.flow.event.StartFlow",
"net.corda.data.flow.event.Wakeup",
"net.corda.data.flow.output.FlowStatus",
"net.corda.data.flow.event.SessionEvent",
"net.corda.data.flow.event.external.ExternalEventResponse"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
{
"name": "payload",
"type": [
"net.corda.data.flow.event.session.SessionInit",
"net.corda.data.flow.event.session.SessionConfirm",
"net.corda.data.flow.event.session.SessionCounterpartyInfoRequest",
"net.corda.data.flow.event.session.SessionCounterpartyInfoResponse",
"net.corda.data.flow.event.session.SessionData",
"net.corda.data.flow.event.session.SessionClose",
"net.corda.data.flow.event.session.SessionError"
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "record",
"name": "SessionCounterpartyInfoRequest",
"doc" : "Request counterparties flow session information. This includes the flow protocol version that they are running.",
"namespace": "net.corda.data.flow.event.session",
"fields": [
{
"name": "sessionInit",
"type": "net.corda.data.flow.event.session.SessionInit",
"doc": "Contains information that can be used to start an initiated flow. Will be null for messages sent to the initiator. Will be null when initiated party is confirmed to be present to ensure out of order messages that arrive first contain this info."
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "record",
"name": "SessionCounterpartyInfoResponse",
"doc" : "Sent from initiated to initiating party to inform them which protocol version of the flow they are running.",
"namespace": "net.corda.data.flow.event.session",
"fields": []
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cordaProductVersion = 5.1.0
# NOTE: update this each time this module contains a breaking change
## NOTE: currently this is a top level revision, so all API versions will line up, but this could be moved to
## a per module property in which case module versions can change independently.
cordaApiRevision = 20
cordaApiRevision = 21

# Main
kotlinVersion = 1.8.21
Expand Down

0 comments on commit 28ffabb

Please sign in to comment.