Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip - adding new haskell module for plugin.
it does not compile, but apparently nix/cabal have spoken together and conspired against me by refusing to even look at the file until I've done a 'git add' on it.
- Loading branch information
Matthew Eric Bassett
committed
Jul 8, 2020
1 parent
25fbc46
commit 4b5be26
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module Cardano.DbSync.Plugin.TxBody | ||
( insertTxBody | ||
) where | ||
import Cardano.Binary (serialize') | ||
import Control.Monad.Logger (LoggingT) | ||
import Control.Monad.Trans.Except.Extra (runExceptT) | ||
|
||
import qualified Cardano.Chain.Block as Ledger | ||
import qualified Cardano.Chain.Common as Ledger | ||
import qualified Cardano.Chain.UTxO as Ledger | ||
|
||
|
||
insertTxBody :: Trace IO Text -> ByronBlock -> Tip ByronBlock | ||
-> ReadterT SqlBackend (LoggingT IO) (Either DBSyncNodeError ()) | ||
insertTxBody tracer blk tip = do | ||
runExceptT $ | ||
case byronBlockRaw blk of | ||
Ledger.ABOBBlock ablk -> insert | ||
_ -> return () | ||
|