aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGav Wood <g@ethdev.com>2015-06-18 23:38:04 +0800
committerGav Wood <g@ethdev.com>2015-06-18 23:38:04 +0800
commit4f52ad7e5bf545d1a8fe57bac44121aeda70ae4b (patch)
tree0f7359a6e47df89ab98fd1aa9700417e21e965fb
parent1541aa403bf9420e426af4b3045a1ebf423c6fa1 (diff)
parentff96f48487a0ee4dc4480602143f1e3d6233731e (diff)
downloaddexon-solidity-4f52ad7e5bf545d1a8fe57bac44121aeda70ae4b.tar.gz
dexon-solidity-4f52ad7e5bf545d1a8fe57bac44121aeda70ae4b.tar.zst
dexon-solidity-4f52ad7e5bf545d1a8fe57bac44121aeda70ae4b.zip
Merge pull request #2144 from chriseth/cleanupSecretStore
Cleanup of SecretStore.
-rw-r--r--TestUtils.cpp11
-rw-r--r--TestUtils.h9
2 files changed, 20 insertions, 0 deletions
diff --git a/TestUtils.cpp b/TestUtils.cpp
index ff5169d5..bd603a61 100644
--- a/TestUtils.cpp
+++ b/TestUtils.cpp
@@ -22,6 +22,7 @@
#include <thread>
#include <boost/test/unit_test.hpp>
#include <boost/filesystem.hpp>
+#include <libdevcrypto/Common.h>
#include <libtestutils/Common.h>
#include <libtestutils/BlockChainLoader.h>
#include <libtestutils/FixedClient.h>
@@ -116,3 +117,13 @@ void ParallelClientBaseFixture::enumerateClients(std::function<void(Json::Value
});
});
}
+
+MoveNonceToTempDir::MoveNonceToTempDir()
+{
+ crypto::Nonce::setSeedFilePath(m_dir.path() + "/seed");
+}
+
+MoveNonceToTempDir::~MoveNonceToTempDir()
+{
+ crypto::Nonce::reset();
+}
diff --git a/TestUtils.h b/TestUtils.h
index f9817c21..94558635 100644
--- a/TestUtils.h
+++ b/TestUtils.h
@@ -24,6 +24,7 @@
#include <functional>
#include <string>
#include <json/json.h>
+#include <libdevcore/TransientDirectory.h>
#include <libethereum/BlockChain.h>
#include <libethereum/ClientBase.h>
@@ -78,5 +79,13 @@ struct JsonRpcFixture: public ClientBaseFixture
};
+struct MoveNonceToTempDir
+{
+ MoveNonceToTempDir();
+ ~MoveNonceToTempDir();
+private:
+ TransientDirectory m_dir;
+};
+
}
}