Преглед изворни кода

Add logic short-circuit to avoid unnecessary bond rebuild logic when appropriate

Joseph Henry пре 3 година
родитељ
комит
0e23ba8f1a
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      node/Bond.cpp

+ 4 - 0
node/Bond.cpp

@@ -980,6 +980,10 @@ void Bond::curateBond(int64_t now, bool rebuildBond)
 		dumpInfo(now, true);
 	}
 
+	if (! _numAliveLinks && ! _numTotalLinks) {
+		return;
+	}
+
 	/**
 	 * Curate the set of paths that are part of the bond proper. Select a set of paths
 	 * per logical link according to eligibility and user-specified constraints.