diff --git a/hydra-node/json-schemas/api.yaml b/hydra-node/json-schemas/api.yaml index d3f2ce58f5f..3c73a3e0faf 100644 --- a/hydra-node/json-schemas/api.yaml +++ b/hydra-node/json-schemas/api.yaml @@ -611,11 +611,11 @@ components: type: object additionalProperties: false required: - - snapshot + - initialUTxO - tag properties: - snapshot: - $ref: "#/components/schemas/Snapshot" + initialUTxO: + $ref: "#/components/schemas/UTxO" tag: type: string enum: ["InitialSnapshot"] diff --git a/hydra-node/src/Hydra/Chain/Direct/Context.hs b/hydra-node/src/Hydra/Chain/Direct/Context.hs index e8be256746d..774c555a664 100644 --- a/hydra-node/src/Hydra/Chain/Direct/Context.hs +++ b/hydra-node/src/Hydra/Chain/Direct/Context.hs @@ -199,7 +199,7 @@ genStClosed ctx utxo = do let (sn, snapshot, toFanout) = case confirmed of InitialSnapshot{} -> ( 0 - , InitialSnapshot {initialUtxo = u0} + , InitialSnapshot {initialUTxO = u0} , u0 ) ConfirmedSnapshot{snapshot = snap, signatures} -> diff --git a/hydra-node/src/Hydra/Snapshot.hs b/hydra-node/src/Hydra/Snapshot.hs index c7bb66c81e7..4eafd6ebc04 100644 --- a/hydra-node/src/Hydra/Snapshot.hs +++ b/hydra-node/src/Hydra/Snapshot.hs @@ -70,7 +70,7 @@ instance (FromCBOR tx, FromCBOR (UTxOType tx)) => FromCBOR (Snapshot tx) where -- | A snapshot that can be used to close a head with. Either the initial one, or when it was signed by all parties, i.e. it is confirmed. data ConfirmedSnapshot tx - = InitialSnapshot { initialUtxo :: UTxOType tx } + = InitialSnapshot { initialUTxO :: UTxOType tx } | ConfirmedSnapshot { snapshot :: Snapshot tx , signatures :: MultiSignature (Snapshot tx) @@ -86,10 +86,10 @@ data ConfirmedSnapshot tx -- | Safely get a 'Snapshot' from a confirmed snapshot. getSnapshot :: ConfirmedSnapshot tx -> Snapshot tx getSnapshot = \case - InitialSnapshot{initialUtxo} -> + InitialSnapshot{initialUTxO} -> Snapshot { number = 0 - , utxo = initialUtxo + , utxo = initialUTxO , confirmed = [] } ConfirmedSnapshot{snapshot} -> snapshot