guessMSSize :: (Int,Int) -> Int
guessMSSize (m,n) =
    -- OutPoint (36) + Sequence (4) + Script
    40 + (BS.length $ encode' $ VarInt $ fromIntegral scp) + scp
  where
    -- OP_M + n*PubKey + OP_N + OP_CHECKMULTISIG
    rdm = BS.length $ encode' $ opPushData $ BS.replicate (n*34 + 3) 0
    -- Redeem + m*sig + OP_0
    scp = rdm + m*73 + 1

{- Build a new Tx -}

-- | Build a transaction by providing a list of outpoints as inputs
-- and a list of recipients addresses and amounts as outputs.
guessMSSize :: (Int,Int) -> Int
guessMSSize (m,n) =
    -- OutPoint (36) + Sequence (4) + Script
    40 + (BS.length $ encode' $ VarInt $ fromIntegral scp) + scp
  where
    -- OP_M + n*PubKey + OP_N + OP_CHECKMULTISIG
    rdm = BS.length $ encode' $ opPushData $ BS.replicate (n*34 + 3) 0
    -- Redeem + m*sig + OP_0
    scp = rdm + m*73 + 1

{- Build a new Tx -}

-- | Build a transaction by providing a list of outpoints as inputs
-- and a list of recipients addresses and amounts as outputs.
guessMSSize (m,n) =
    -- OutPoint (36) + Sequence (4) + Script
    40 + (BS.length $ encode' $ VarInt $ fromIntegral scp) + scp
  where
    -- OP_M + n*PubKey + OP_N + OP_CHECKMULTISIG
    rdm = BS.length $ encode' $ opPushData $ BS.replicate (n*34 + 3) 0
    -- Redeem + m*sig + OP_0
    scp = rdm + m*73 + 1

{- Build a new Tx -}

-- | Build a transaction by providing a list of outpoints as inputs
-- and a list of recipients addresses and amounts as outputs.