From: Roland Häder Date: Thu, 21 Feb 2013 23:49:27 +0000 (+0000) Subject: 'virigin' is now the correct state at this point X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=faaf0551b5dbc64ea69d79481f8f08a2078994e0;p=hub.git 'virigin' is now the correct state at this point --- diff --git a/application/hub/main/helper/dht/class_DhtBootstrapHelper.php b/application/hub/main/helper/dht/class_DhtBootstrapHelper.php index d3d797b4f..ee3afc770 100644 --- a/application/hub/main/helper/dht/class_DhtBootstrapHelper.php +++ b/application/hub/main/helper/dht/class_DhtBootstrapHelper.php @@ -81,8 +81,8 @@ class DhtBootstrapHelper extends BaseHubSystemHelper implements HelpableDht { * @return void */ public function sendPackage (Distributable $dhtInstance) { - // Sanity check: Is the dht in the approx. state? (init) - $dhtInstance->getStateInstance()->validateDhtStateIsInitialized(); + // Sanity check: Is the dht in the approx. state? (virgin) + $dhtInstance->getStateInstance()->validateDhtStateIsVirgin(); // Compile the template, this inserts the loaded dht data into the gaps. $this->getTemplateInstance()->compileTemplate(); diff --git a/application/hub/main/states/dht/class_BaseDhtState.php b/application/hub/main/states/dht/class_BaseDhtState.php index 8a1223acf..a78f9dc16 100644 --- a/application/hub/main/states/dht/class_BaseDhtState.php +++ b/application/hub/main/states/dht/class_BaseDhtState.php @@ -34,15 +34,15 @@ class BaseDhtState extends BaseState { } /** - * Validates whether the DHT state is 'init' or throws an exception if it + * Validates whether the DHT state is 'virgin' or throws an exception if it * is every other state. * * @return void - * @throws InvalidStateException If the state is not 'active' + * @throws InvalidStateException If the state is not 'virgin' */ - public function validateDhtStateIsInitialized () { + public function validateDhtStateIsVirgin () { // Just compare it... - if (!$this instanceof DhtInitState) { + if (!$this instanceof DhtVirginState) { // Throw the exception throw new InvalidStateException($this, self::EXCEPTION_INVALID_STATE); } // END - if