putInOut :: MonadPut m => Tx -> m ()
putInOut tx = do
    putVarInt $ length (txIn tx)
    forM_ (txIn tx) serialize
    putVarInt $ length (txOut tx)
    forM_ (txOut tx) serialize

-- | Non-SegWit transaction serializer.
putInOut :: MonadPut m => Tx -> m ()
putInOut tx = do
    putVarInt $ length (txIn tx)
    forM_ (txIn tx) serialize
    putVarInt $ length (txOut tx)
    forM_ (txOut tx) serialize

-- | Non-SegWit transaction serializer.
putInOut tx = do
    putVarInt $ length (txIn tx)
    forM_ (txIn tx) serialize
    putVarInt $ length (txOut tx)
    forM_ (txOut tx) serialize

-- | Non-SegWit transaction serializer.