Implement identification of transparent output #52
1 changed files with 8 additions and 4 deletions
12
test/Spec.hs
12
test/Spec.hs
|
@ -792,7 +792,7 @@ main = do
|
||||||
Nothing -> assertFailure "Couldn't decode"
|
Nothing -> assertFailure "Couldn't decode"
|
||||||
Just t' -> do
|
Just t' -> do
|
||||||
let a =
|
let a =
|
||||||
"utest1hhggl4nxfdx63evps6r7qz50cgacgtdpt9k7dl0734w63zn5qmrp6c2xdv9rkqyfkj6kgau4kz48xtm80e67l534qp02teqq86zuzetxql6z5v32yglg9n2un5zsu0hwcvaunzdfg5qnry6syh2dh9x8eu27de03j9pjfvrqda6acgtc6f0emdfh6r5jvfanmjml4ms5wwj9wfqmamq"
|
"utest13dq4u4dnf3yddw8lq2n6zdclshra6xsp8zgkc5ydyu6k20zrsscmuex46qa4vh84rgd78sqnlleapznnz7mnzx9wv0unts8pv32paj8se5ca3kves2u4a89uy6e8cf4hnarxydxh7hq2e9uu39punfmm53k5h45xn9k3dx35la8j7munh9td7774m8gkqgc4mn40t69w20uu2gtks7a"
|
||||||
let a' = isValidUnifiedAddress a
|
let a' = isValidUnifiedAddress a
|
||||||
let tb = zt_tBundle t'
|
let tb = zt_tBundle t'
|
||||||
let myTb = fromRawTBundle tb
|
let myTb = fromRawTBundle tb
|
||||||
|
@ -801,9 +801,13 @@ main = do
|
||||||
Just addr -> do
|
Just addr -> do
|
||||||
case myTb of
|
case myTb of
|
||||||
Nothing -> assertFailure "Couldn't read transparent bundle"
|
Nothing -> assertFailure "Couldn't read transparent bundle"
|
||||||
Just myTb' ->
|
Just myTb' -> do
|
||||||
show ((\(TxOut v s) -> s) (head (tb_vout myTb'))) `shouldBe`
|
let pkHash =
|
||||||
maybe "" (show . ta_bytes) (t_rec addr)
|
BS.take 20 $
|
||||||
|
BS.drop 3 $
|
||||||
|
(\(TxOut v s) -> s) (head (tb_vout myTb'))
|
||||||
|
pkHash `shouldBe`
|
||||||
|
maybe "" (hexBytes . ta_bytes) (t_rec addr)
|
||||||
myTb `shouldNotBe` Nothing
|
myTb `shouldNotBe` Nothing
|
||||||
it "Sapling component is read" $ do
|
it "Sapling component is read" $ do
|
||||||
case t of
|
case t of
|
||||||
|
|
Loading…
Reference in a new issue