question: public static Script createRedeemScript ( int threshold , List < ECKey > pubkeys ) { pubkeys = new ArrayList < ECKey > ( pubkeys ) ; Collections . sort ( pubkeys , ECKey . PUBKEY_COMPARATOR ) ; return ScriptBuilder . createMultiSigOutputScript ( threshold , pubkeys ) ; }
target:  Creates redeem script with given public keys and threshold. Given public keys will be placed in redeem script in the lexicographical sorting order.