Skip to content

Commit

Permalink
Remove unused function watchUTxOUntil
Browse files Browse the repository at this point in the history
  • Loading branch information
locallycompact committed Dec 8, 2024
1 parent 664c0ae commit 540191e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
7 changes: 1 addition & 6 deletions hydra-node/src/Hydra/Chain/Direct/Wallet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ import Cardano.Ledger.Shelley.API qualified as Ledger
import Cardano.Ledger.Val (invert)
import Cardano.Slotting.EpochInfo (EpochInfo)
import Cardano.Slotting.Time (SystemStart (..))
import Control.Concurrent.Class.MonadSTM (check, newTVarIO, readTVarIO, writeTVar)
import Control.Concurrent.Class.MonadSTM (newTVarIO, readTVarIO, writeTVar)
import Control.Lens (view, (%~), (.~), (^.))
import Data.List qualified as List
import Data.Map.Strict ((!))
Expand Down Expand Up @@ -144,11 +144,6 @@ data WalletInfoOnChain = WalletInfoOnChain

type ChainQuery m = QueryPoint -> Api.Address ShelleyAddr -> m WalletInfoOnChain

watchUTxOUntil :: (Map TxIn TxOut -> Bool) -> TinyWallet IO -> IO (Map TxIn TxOut)
watchUTxOUntil predicate TinyWallet{getUTxO} = atomically $ do
u <- getUTxO
u <$ check (predicate u)

-- | Create a new tiny wallet handle.
newTinyWallet ::
-- | A tracer for logging
Expand Down
5 changes: 0 additions & 5 deletions hydra-node/test/Hydra/Chain/Direct/TxTraceSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,6 @@ latestSnapshotNumber = \case
(s : _) -> s.number
_ -> 0

latestSnapshot :: [ModelSnapshot] -> Maybe ModelSnapshot
latestSnapshot = \case
[] -> Nothing
(s : _) -> Just s

-- | Model of a real snapshot which contains a 'SnapshotNumber` but also our
-- simplified form of 'UTxO'.
data ModelSnapshot = ModelSnapshot
Expand Down

0 comments on commit 540191e

Please sign in to comment.