implemented commit 787ee0c91394b0ae16ca2500dbacf9349e65b6bc from bitcoin, regarding redeem script size