arbitrarySigningData :: Gen (Tx, [SigInput], [PrvKey])
arbitrarySigningData = do
    v  <- arbitrary
    ni <- choose (1,5)
    no <- choose (1,5)
    sigis <- vectorOf ni arbitrarySigInput
    let uSigis = nubBy (\(a,_) (b,_) -> sigDataOP a == sigDataOP b) sigis
    inps <- forM uSigis $ \(s,_) -> do
        sq <- arbitrary
        return $ TxIn (sigDataOP s) BS.empty sq
    outs <- vectorOf no arbitraryTxOut
    l    <- arbitrary
    perm <- choose (0, length inps - 1)
    let tx   = createTx v (permutations inps !! perm) outs l
        keys = concatMap snd uSigis
    return (tx, map fst uSigis, keys)
arbitrarySigningData :: Gen (Tx, [SigInput], [PrvKey])
arbitrarySigningData = do
    v  <- arbitrary
    ni <- choose (1,5)
    no <- choose (1,5)
    sigis <- vectorOf ni arbitrarySigInput
    let uSigis = nubBy (\(a,_) (b,_) -> sigDataOP a == sigDataOP b) sigis
    inps <- forM uSigis $ \(s,_) -> do
        sq <- arbitrary
        return $ TxIn (sigDataOP s) BS.empty sq
    outs <- vectorOf no arbitraryTxOut
    l    <- arbitrary
    perm <- choose (0, length inps - 1)
    let tx   = createTx v (permutations inps !! perm) outs l
        keys = concatMap snd uSigis
    return (tx, map fst uSigis, keys)
arbitrarySigningData = do
    v  <- arbitrary
    ni <- choose (1,5)
    no <- choose (1,5)
    sigis <- vectorOf ni arbitrarySigInput
    let uSigis = nubBy (\(a,_) (b,_) -> sigDataOP a == sigDataOP b) sigis
    inps <- forM uSigis $ \(s,_) -> do
        sq <- arbitrary
        return $ TxIn (sigDataOP s) BS.empty sq
    outs <- vectorOf no arbitraryTxOut
    l    <- arbitrary
    perm <- choose (0, length inps - 1)
    let tx   = createTx v (permutations inps !! perm) outs l
        keys = concatMap snd uSigis
    return (tx, map fst uSigis, keys)