summaryrefslogtreecommitdiff
path: root/node/Network.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-10-03 16:14:34 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-10-03 16:14:34 -0700
commitaad344bb843c74a5ec8cdf0e8fb626cb6feb4e0c (patch)
tree5c5f9e5c4c8bdaece22c1c65a7d26af1c4cbf199 /node/Network.hpp
parent13fc20b0eed39084b6b0fbaf55696c7688796706 (diff)
downloadinfinitytier-aad344bb843c74a5ec8cdf0e8fb626cb6feb4e0c.tar.gz
infinitytier-aad344bb843c74a5ec8cdf0e8fb626cb6feb4e0c.zip
Add test network support to Network.
Diffstat (limited to 'node/Network.hpp')
-rw-r--r--node/Network.hpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/node/Network.hpp b/node/Network.hpp
index 7c038811..7c21345e 100644
--- a/node/Network.hpp
+++ b/node/Network.hpp
@@ -174,19 +174,22 @@ public:
}
/**
- * Set or update this network's configuration
- *
- * This is called in IncomingPacket when an update comes over the wire, or
- * internally when an old config is reloaded from disk.
+ * Apply a NetworkConfig to this network
*
- * This also cancels any netconf failure flags.
+ * @param conf Configuration in NetworkConfig form
+ * @return True if configuration was accepted
+ */
+ bool applyConfiguration(const SharedPtr<NetworkConfig> &conf);
+
+ /**
+ * Set or update this network's configuration
*
- * The network can't accept configuration when in INITIALIZATION state,
- * and so in that state this will just return false.
+ * This decodes a network configuration in key=value dictionary form,
+ * applies it if valid, and persists it to disk if saveToDisk is true.
*
* @param conf Configuration in key/value dictionary form
* @param saveToDisk IF true (default), write config to disk
- * @return True if configuration was accepted, false if still initializing or config was not valid
+ * @return True if configuration was accepted
*/
bool setConfiguration(const Dictionary &conf,bool saveToDisk = true);