def cosigner_can_sign(self, tx, cosigner_xpub):
    from electrum_zcash.keystore import is_xpubkey, parse_xpubkey
    xpub_set = set([])
    for txin in tx.inputs():
        for x_pubkey in txin['x_pubkeys']:
            if is_xpubkey(x_pubkey):
                (xpub, s) = parse_xpubkey(x_pubkey)
                xpub_set.add(xpub)
    return (cosigner_xpub in xpub_set)
def cosigner_can_sign(self, tx, cosigner_xpub):
    from electrum_zcash.keystore import is_xpubkey, parse_xpubkey
    xpub_set = set([])
    for txin in tx.inputs():
        for x_pubkey in txin['x_pubkeys']:
            if is_xpubkey(x_pubkey):
                (xpub, s) = parse_xpubkey(x_pubkey)
                xpub_set.add(xpub)
    return (cosigner_xpub in xpub_set)