From aad344bb843c74a5ec8cdf0e8fb626cb6feb4e0c Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 3 Oct 2014 16:14:34 -0700 Subject: Add test network support to Network. --- node/Network.hpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'node/Network.hpp') 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 &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); -- cgit v1.2.3