diff options
-rw-r--r-- | TestUtils.cpp | 11 | ||||
-rw-r--r-- | TestUtils.h | 9 |
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; +}; + } } |