protected override void OnStalling(ChainedBlock chainedBlock) { NodesBlockPullerBehavior behavior = null; if (_Map.TryGetValue(chainedBlock.HashBlock, out behavior)) { behavior.QualityScore = Math.Max(MinQualityScore, behavior.QualityScore - 1); if (behavior.QualityScore == MinQualityScore) { //behavior.ReleaseAll(); //AssignPendingVectors(); } } else { AssignPendingVectors(); } }
protected override void OnStalling(ChainedBlock chainedBlock) { NodesBlockPullerBehavior behavior = null; if (_Map.TryGetValue(chainedBlock.HashBlock, out behavior)) { behavior.QualityScore = Math.Max(MinQualityScore, behavior.QualityScore - 1); if (behavior.QualityScore == MinQualityScore) { // TODO: this does not necessarily mean the node is slow // the best way is to check the nodes download speed, how // many kb/s the node for the node download speed. behavior.ReleaseAll(); AssignPendingVectors(); } } else { AssignPendingVectors(); } }