function verifyECDSA(
      bytes32 msgHash,
      bytes calldata signatures
  ) internal view returns (bool) {
      require(
          signatures.length % 65 == 0,
          "Signature length must be a multiple of 65"
      );

      uint256 len = signatures.length;
      uint256 m = 0;
      for (uint256 i = 0; i < len; i += 65) {
          bytes memory sig = signatures[i:i + 65];
          if (
              validators[msgHash.recover(sig)] && ++m >= required_validators
          ) {
              return true;
          }
      }

      return false;
  }
function verifyECDSA(
      bytes32 msgHash,
      bytes calldata signatures
  ) internal view returns (bool) {
      require(
          signatures.length % 65 == 0,
          "Signature length must be a multiple of 65"
      );

      uint256 len = signatures.length;
      uint256 m = 0;
      for (uint256 i = 0; i < len; i += 65) {
          bytes memory sig = signatures[i:i + 65];
          if (
-             validators[msgHash.recover(sig)] && ++m >= required_validators
+             validators[msgHash.recover(sig)] && ++m == required_validators
          ) {
              return true;
          }
      }

      return false;
  }
