diff --git a/hydra-node/json-schemas/api.yaml b/hydra-node/json-schemas/api.yaml index 0137a73f0c4..487704853c1 100644 --- a/hydra-node/json-schemas/api.yaml +++ b/hydra-node/json-schemas/api.yaml @@ -1555,7 +1555,7 @@ components: tag: type: string enum: ["InvalidHeadId"] - headSeed: + headId: $ref: "api.yaml#/components/schemas/HeadId" - title: FailedToConstructAbortTx description: | diff --git a/hydra-node/json-schemas/logs.yaml b/hydra-node/json-schemas/logs.yaml index 2acad0f8a44..9145f3e91df 100644 --- a/hydra-node/json-schemas/logs.yaml +++ b/hydra-node/json-schemas/logs.yaml @@ -1732,10 +1732,10 @@ definitions: additionalProperties: false required: - tag - - contestationPeriod - - parties - headId - headSeed + - headParameters + - participants description: >- The initial transaction of the Head, announcing various parameters and the parties, has been posted on-chain. @@ -1743,19 +1743,16 @@ definitions: tag: type: string enum: ["OnInitTx"] - contestationPeriod: - type: number - description: >- - The length of the contestaion period, in seconds, represented as a - decimal number. - parties: - type: array - items: - $ref: "api.yaml#/components/schemas/Party" headId: $ref: "api.yaml#/components/schemas/HeadId" headSeed: $ref: "api.yaml#/components/schemas/HeadSeed" + headParameters: + $ref: "api.yaml#/components/schemas/HeadParameters" + participants: + type: array + items: + $ref: "api.yaml#/components/schemas/OnChainId" - title: OnCommitTx type: object additionalProperties: false @@ -1806,12 +1803,15 @@ definitions: additionalProperties: false required: - tag + - headId - snapshotNumber - contestationDeadline properties: tag: type: string enum: ["OnCloseTx"] + headId: + $ref: "api.yaml#/components/schemas/HeadId" snapshotNumber: type: integer minimum: 0 @@ -1822,11 +1822,14 @@ definitions: additionalProperties: false required: - tag + - headId - snapshotNumber properties: tag: type: string enum: ["OnContestTx"] + headId: + $ref: "api.yaml#/components/schemas/HeadId" snapshotNumber: type: integer minimum: 0 @@ -1835,10 +1838,13 @@ definitions: additionalProperties: false required: - tag + - headId properties: tag: type: string enum: ["OnFanoutTx"] + headId: + $ref: "api.yaml#/components/schemas/HeadId" Effect: description: >- diff --git a/hydra-node/src/Hydra/Chain.hs b/hydra-node/src/Hydra/Chain.hs index 8e9a9d7ecdc..c6585a9af77 100644 --- a/hydra-node/src/Hydra/Chain.hs +++ b/hydra-node/src/Hydra/Chain.hs @@ -95,7 +95,11 @@ data OnChainTx tx , headParameters :: HeadParameters , participants :: [OnChainId] } - | OnCommitTx {headId :: HeadId, party :: Party, committed :: UTxOType tx} + | OnCommitTx + { headId :: HeadId + , party :: Party + , committed :: UTxOType tx + } | OnAbortTx {headId :: HeadId} | OnCollectComTx {headId :: HeadId} | OnCloseTx @@ -103,7 +107,10 @@ data OnChainTx tx , snapshotNumber :: SnapshotNumber , contestationDeadline :: UTCTime } - | OnContestTx {headId :: HeadId, snapshotNumber :: SnapshotNumber} + | OnContestTx + { headId :: HeadId + , snapshotNumber :: SnapshotNumber + } | OnFanoutTx {headId :: HeadId} deriving stock (Generic)