internal IEnumerable <RoundStateResponse> GetStatesCollection() { var response = new List <RoundStateResponse>(); foreach (CoordinatorRound round in Coordinator.GetRunningRounds()) { var state = new RoundStateResponse { Phase = round.Phase, SchnorrPubKeys = round.MixingLevels.SchnorrPubKeys, Denomination = round.MixingLevels.GetBaseDenomination(), InputRegistrationTimesout = round.InputRegistrationTimesout, RegisteredPeerCount = round.CountAlices(syncLock: false), RequiredPeerCount = round.AnonymitySet, MaximumInputCountPerPeer = 7, // Constant for now. If we want to do something with it later, we'll put it to the config file. RegistrationTimeout = (int)round.AliceRegistrationTimeout.TotalSeconds, FeePerInputs = round.FeePerInputs, FeePerOutputs = round.FeePerOutputs, CoordinatorFeePercent = round.CoordinatorFeePercent, RoundId = round.RoundId, SuccessfulRoundCount = Coordinator.GetCoinJoinCount() // This is round independent, it is only here because of backward compatibility. }; response.Add(state); } return(response); }
public ClientRound(RoundStateResponse state) { State = Guard.NotNull(nameof(state), state); ClearRegistration(); // shortcut for initializing variables }