diff --git a/peer.cpp b/peer.cpp index 6dfe363fa..21aa85004 100644 --- a/peer.cpp +++ b/peer.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include using namespace std; @@ -47,7 +48,7 @@ int peerTest(int argc, char** argv) remoteHost = argv[i]; } - BlockChain ch("/tmp"); + BlockChain ch(boost::filesystem::temp_directory_path().string()); PeerServer pn("Test", ch, 0, listenPort); if (!remoteHost.empty()) diff --git a/state.cpp b/state.cpp index 8cd5f9ff3..a3ea2aea2 100644 --- a/state.cpp +++ b/state.cpp @@ -20,6 +20,7 @@ * State test functions. */ +#include #include #include #include @@ -33,7 +34,7 @@ int stateTest() KeyPair myMiner = sha3("Gav's Miner"); // KeyPair you = sha3("123"); - Defaults::setDBPath("/tmp"); + Defaults::setDBPath(boost::filesystem::temp_directory_path().string()); Overlay stateDB = State::openDB(); BlockChain bc;