Correct the parsing of OutPoint #46
1 changed files with 6 additions and 2 deletions
|
@ -31,9 +31,10 @@ import qualified Data.ByteArray as BA
|
|||
import qualified Data.ByteString as BS
|
||||
import qualified Data.ByteString.Char8 as C
|
||||
import qualified Data.ByteString.Lazy.UTF8 as US
|
||||
import qualified Data.ByteString.Short as BS (ShortByteString, toShort)
|
||||
import Data.HexString
|
||||
import Data.Int
|
||||
import Data.Maybe (fromMaybe)
|
||||
import Data.Maybe (fromJust, fromMaybe)
|
||||
import Data.Structured
|
||||
import qualified Data.Text as T
|
||||
import qualified Data.Text.Encoding as E
|
||||
|
@ -41,6 +42,7 @@ import Data.Word
|
|||
import qualified GHC.Generics as GHC
|
||||
import qualified Generics.SOP as SOP
|
||||
import Haskoin.Address (Address)
|
||||
import qualified Haskoin.Crypto.Hash as H (Hash256(..))
|
||||
import Haskoin.Crypto.Keys.Extended (XPrvKey)
|
||||
import qualified Haskoin.Transaction.Common as H
|
||||
|
||||
|
@ -151,7 +153,9 @@ fromRawTxIn :: RawTxIn -> H.TxIn
|
|||
fromRawTxIn t =
|
||||
H.TxIn
|
||||
(H.OutPoint
|
||||
(read $ US.toString $ C.fromStrict $ rop_hash $ rti_outpoint t)
|
||||
((fromJust .
|
||||
H.hexToTxHash . E.decodeUtf8Lenient . rop_hash . rti_outpoint)
|
||||
t)
|
||||
(rop_n $ rti_outpoint t))
|
||||
(rti_script t)
|
||||
(rti_seq t)
|
||||
|
|
Loading…
Reference in a new issue