protected void ReportRejectedShare(string reason = null) { int shareID = -1; OpenCLDevice device = null; try { mMutex.WaitOne(5000); } catch (Exception) { } if (mDevicesWithShare.Count > 0) { device = mDevicesWithShare[0]; mDevicesWithShare.RemoveAt(0); shareID = mShareIDs[0]; mShareIDs.RemoveAt(0); } try { mMutex.ReleaseMutex(); } catch (Exception) { } if (!MainForm.DevFeeMode) { device.IncrementRejectedShares(); MainForm.Instance.ReportRejectedShare(); } if (shareID >= 0 && !MainForm.DevFeeMode) { MainForm.Logger("Share #" + shareID + " rejected."); } else { MainForm.Logger("Share rejected."); } }
protected void ReportShareRejection() { if (MainForm.DevFeeMode) { return; } try { mMutex.WaitOne(5000); } catch (Exception) { } if (mDevicesWithShare.Count > 0) { OpenCLDevice device = mDevicesWithShare[0]; mDevicesWithShare.RemoveAt(0); device.IncrementRejectedShares(); } try { mMutex.ReleaseMutex(); } catch (Exception) { } }