-- | Arbitrary Tx
arbitraryTx :: Gen Tx
arbitraryTx = do
    v    <- arbitrary
    ni   <- choose (0,5)
    no   <- choose (0,5)
    inps <- vectorOf ni arbitraryTxIn
    outs <- vectorOf no arbitraryTxOut
    let uniqueInps = nubBy (\a b -> prevOutput a == prevOutput b) inps
    t    <- arbitrary
    return $ createTx v uniqueInps outs t

-- | Arbitrary Tx containing only inputs of type SpendPKHash, SpendScriptHash
-- (multisig) and outputs of type PayPKHash and PaySH. Only compressed
-- public keys are used.
arbitraryTx :: Gen Tx
arbitraryTx = do
    v    <- arbitrary
    ni   <- choose (0,5)
    no   <- choose (0,5)
    inps <- vectorOf ni arbitraryTxIn
    outs <- vectorOf no arbitraryTxOut
    let uniqueInps = nubBy (\a b -> prevOutput a == prevOutput b) inps
    t    <- arbitrary
    return $ createTx v uniqueInps outs t

-- | Arbitrary Tx containing only inputs of type SpendPKHash, SpendScriptHash
-- (multisig) and outputs of type PayPKHash and PaySH. Only compressed
-- public keys are used.
arbitraryTx = do
    v    <- arbitrary
    ni   <- choose (0,5)
    no   <- choose (0,5)
    inps <- vectorOf ni arbitraryTxIn
    outs <- vectorOf no arbitraryTxOut
    let uniqueInps = nubBy (\a b -> prevOutput a == prevOutput b) inps
    t    <- arbitrary
    return $ createTx v uniqueInps outs t

-- | Arbitrary Tx containing only inputs of type SpendPKHash, SpendScriptHash
-- (multisig) and outputs of type PayPKHash and PaySH. Only compressed
-- public keys are used.