Skip to content

Commit

Permalink
Update ContestTx data type to be similar to CloseTx
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1bo committed Jun 16, 2021
1 parent c402b2d commit b875581
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hydra-node/src/Hydra/HeadLogic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ data OnChainTx tx
| CommitTx ParticipationToken (UTxO tx)
| CollectComTx (UTxO tx)
| CloseTx (Snapshot tx) [tx]
| ContestTx
| ContestTx (Snapshot tx) [tx]
| FanoutTx (UTxO tx)

deriving instance Tx tx => Eq (OnChainTx tx)
Expand Down Expand Up @@ -332,7 +332,7 @@ update Environment{party, snapshotStrategy} ledger (HeadState p st) ev = case (s
(ClosedState confirmedUTxO)
[ClientEffect $ HeadIsClosed (contestationPeriod p) snapshot txs]
--
(_, OnChainEvent ContestTx) ->
(_, OnChainEvent ContestTx{}) ->
-- TODO: Handle contest tx
newState p st []
(ClosedState utxo, ShouldPostFanout) ->
Expand Down
2 changes: 1 addition & 1 deletion hydra-node/test/Hydra/HeadLogicSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ genOnChainTx =
, CommitTx (ParticipationToken 1 1) [ValidTx 10]
, CollectComTx []
, CloseTx (Snapshot 0 mempty mempty) mempty
, ContestTx
, ContestTx (Snapshot 0 mempty mempty) mempty
, FanoutTx [ValidTx 1]
]

Expand Down

0 comments on commit b875581

Please sign in to comment.