private void OnFedMemberKicked(FedMemberKicked fedMemberKicked) { lock (this.locker) { this.depositsByAddress.Remove(((CollateralFederationMember)fedMemberKicked.KickedMember).CollateralMainchainAddress); } }
private void OnFedMemberKicked(FedMemberKicked fedMemberKicked) { lock (this.locker) { this.logger.LogDebug("Removing federation member {0}", ((CollateralFederationMember)fedMemberKicked.KickedMember).CollateralMainchainAddress); this.depositsByAddress.Remove(((CollateralFederationMember)fedMemberKicked.KickedMember).CollateralMainchainAddress); } }
private void OnFedMemberKicked(FedMemberKicked fedMemberKicked) { lock (this.locker) { if (fedMemberKicked.KickedMember is CollateralFederationMember collateralFederationMember) { this.logger.LogDebug("Removing federation member '{0}' with collateral address '{1}'.", collateralFederationMember.PubKey, collateralFederationMember.CollateralMainchainAddress); if (!string.IsNullOrEmpty(collateralFederationMember.CollateralMainchainAddress)) { this.balancesDataByAddress.Remove(collateralFederationMember.CollateralMainchainAddress); } else { this.logger.LogDebug("(-)[NO_COLLATERAL_ADDRESS]:{0}='{1}'", nameof(fedMemberKicked.KickedMember.PubKey), fedMemberKicked.KickedMember.PubKey); } } else { this.logger.LogError("(-)[NOT_A_COLLATERAL_MEMBER]:{0}='{1}'", nameof(fedMemberKicked.KickedMember.PubKey), fedMemberKicked.KickedMember.PubKey); } } }
private void OnFedMemberKicked(FedMemberKicked fedMemberKickedData) { this.fedPubKeysByLastActiveTime.Remove(fedMemberKickedData.KickedMember.PubKey, out _); this.SaveMembersByLastActiveTime(); }