diff --git a/doc/schemas/app_openapi.json b/doc/schemas/app_openapi.json index d8b7ff856..06b8783f9 100644 --- a/doc/schemas/app_openapi.json +++ b/doc/schemas/app_openapi.json @@ -126,11 +126,19 @@ }, "GetTxStatus__Out": { "properties": { + "seqno": { + "$ref": "#/components/schemas/int64" + }, "status": { "$ref": "#/components/schemas/TxStatus" + }, + "view": { + "$ref": "#/components/schemas/int64" } }, "required": [ + "view", + "seqno", "status" ], "type": "object" diff --git a/doc/schemas/gov_openapi.json b/doc/schemas/gov_openapi.json index aeb2e58c8..b00ff7221 100644 --- a/doc/schemas/gov_openapi.json +++ b/doc/schemas/gov_openapi.json @@ -137,11 +137,19 @@ }, "GetTxStatus__Out": { "properties": { + "seqno": { + "$ref": "#/components/schemas/int64" + }, "status": { "$ref": "#/components/schemas/TxStatus" + }, + "view": { + "$ref": "#/components/schemas/int64" } }, "required": [ + "view", + "seqno", "status" ], "type": "object" diff --git a/doc/schemas/node_openapi.json b/doc/schemas/node_openapi.json index 8f14db480..cc18e5442 100644 --- a/doc/schemas/node_openapi.json +++ b/doc/schemas/node_openapi.json @@ -237,11 +237,19 @@ }, "GetTxStatus__Out": { "properties": { + "seqno": { + "$ref": "#/components/schemas/int64" + }, "status": { "$ref": "#/components/schemas/TxStatus" + }, + "view": { + "$ref": "#/components/schemas/int64" } }, "required": [ + "view", + "seqno", "status" ], "type": "object" diff --git a/src/node/rpc/call_types.h b/src/node/rpc/call_types.h index 53cd5abbe..30653cd20 100644 --- a/src/node/rpc/call_types.h +++ b/src/node/rpc/call_types.h @@ -35,6 +35,8 @@ namespace ccf struct Out { + kv::Consensus::View view; + kv::Consensus::SeqNo seqno; TxStatus status; }; }; diff --git a/src/node/rpc/common_endpoint_registry.h b/src/node/rpc/common_endpoint_registry.h index 9f76381b6..a40ac959b 100644 --- a/src/node/rpc/common_endpoint_registry.h +++ b/src/node/rpc/common_endpoint_registry.h @@ -65,6 +65,8 @@ namespace ccf get_status_for_txid_v1(in.view, in.seqno, out.status); if (result == ccf::ApiResult::OK) { + out.view = in.view; + out.seqno = in.seqno; return make_success(out); } else diff --git a/src/node/rpc/serialization.h b/src/node/rpc/serialization.h index b0bd3edfa..8415539a3 100644 --- a/src/node/rpc/serialization.h +++ b/src/node/rpc/serialization.h @@ -66,7 +66,7 @@ namespace ccf DECLARE_JSON_TYPE(GetTxStatus::In) DECLARE_JSON_REQUIRED_FIELDS(GetTxStatus::In, view, seqno) DECLARE_JSON_TYPE(GetTxStatus::Out) - DECLARE_JSON_REQUIRED_FIELDS(GetTxStatus::Out, status) + DECLARE_JSON_REQUIRED_FIELDS(GetTxStatus::Out, view, seqno, status) DECLARE_JSON_TYPE(GetNetworkInfo::Out) DECLARE_JSON_REQUIRED_FIELDS(