Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ImportException
- type MonadImport m = (MonadError ImportException m, MonadLoggerIO m, StoreReadBase m, StoreWrite m)
- initBest :: MonadImport m => m ()
- revertBlock :: MonadImport m => BlockHash -> m ()
- importBlock :: MonadImport m => Block -> BlockNode -> m (HashSet TxHash)
- newMempoolTx :: MonadImport m => Tx -> UnixTime -> m (Maybe (HashSet TxHash))
- deleteUnconfirmedTx :: MonadImport m => Bool -> TxHash -> m [TxHash]
Documentation
data ImportException Source #
PrevBlockNotBest | |
Orphan | |
UnexpectedCoinbase | |
BestBlockNotFound | |
BlockNotBest | |
TxNotFound | |
DoubleSpend | |
TxConfirmed | |
InsufficientFunds | |
DuplicatePrevOutput | |
TxSpent | |
OrphanLoop | |
SpenderNotFound |
Instances
Eq ImportException Source # | |
Defined in Haskoin.Store.Logic (==) :: ImportException -> ImportException -> Bool # (/=) :: ImportException -> ImportException -> Bool # | |
Ord ImportException Source # | |
Defined in Haskoin.Store.Logic compare :: ImportException -> ImportException -> Ordering # (<) :: ImportException -> ImportException -> Bool # (<=) :: ImportException -> ImportException -> Bool # (>) :: ImportException -> ImportException -> Bool # (>=) :: ImportException -> ImportException -> Bool # max :: ImportException -> ImportException -> ImportException # min :: ImportException -> ImportException -> ImportException # | |
Show ImportException Source # | |
Defined in Haskoin.Store.Logic showsPrec :: Int -> ImportException -> ShowS # show :: ImportException -> String # showList :: [ImportException] -> ShowS # | |
Exception ImportException Source # | |
Defined in Haskoin.Store.Logic |
type MonadImport m = (MonadError ImportException m, MonadLoggerIO m, StoreReadBase m, StoreWrite m) Source #
initBest :: MonadImport m => m () Source #
revertBlock :: MonadImport m => BlockHash -> m () Source #
importBlock :: MonadImport m => Block -> BlockNode -> m (HashSet TxHash) Source #
newMempoolTx :: MonadImport m => Tx -> UnixTime -> m (Maybe (HashSet TxHash)) Source #
If it returns Nothing
, then transaction was not imported because it
already exists. Otherwise tranasction was imported successfully. Any deleted
transactions will be returned in the set (RBF only).
deleteUnconfirmedTx :: MonadImport m => Bool -> TxHash -> m [TxHash] Source #