public void RemoveCustomChangeAddress(BitcoinAddress address) { lock (CustomChangeAddressesLock) { if (CustomChangeAddresses.Contains(address)) { CustomChangeAddresses.Remove(address); } } }
/// <summary> /// Best effort. For example if a round is disrupted my malicious actors, the address won't be registered again, therefore it's not guaranteed money will arrive. /// </summary> public void AddCustomChangeAddress(BitcoinAddress address, bool beginning = false) { lock (CustomChangeAddressesLock) { if (CustomChangeAddresses.Contains(address)) { CustomChangeAddresses.Remove(address); } if (beginning) { CustomChangeAddresses.Insert(0, address); } else { CustomChangeAddresses.Add(address); } } }