mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replace hard-coded /tmp paths with call to boost::filesystem::temp_directory_path()
This commit is contained in:
parent
ae48bfdde2
commit
90b7b43d43
3
peer.cpp
3
peer.cpp
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
#include <boost/filesystem/operations.hpp>
|
||||||
#include <BlockChain.h>
|
#include <BlockChain.h>
|
||||||
#include <PeerNetwork.h>
|
#include <PeerNetwork.h>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -47,7 +48,7 @@ int peerTest(int argc, char** argv)
|
|||||||
remoteHost = argv[i];
|
remoteHost = argv[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockChain ch("/tmp");
|
BlockChain ch(boost::filesystem::temp_directory_path().string());
|
||||||
PeerServer pn("Test", ch, 0, listenPort);
|
PeerServer pn("Test", ch, 0, listenPort);
|
||||||
|
|
||||||
if (!remoteHost.empty())
|
if (!remoteHost.empty())
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
* State test functions.
|
* State test functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <boost/filesystem/operations.hpp>
|
||||||
#include <secp256k1.h>
|
#include <secp256k1.h>
|
||||||
#include <BlockChain.h>
|
#include <BlockChain.h>
|
||||||
#include <State.h>
|
#include <State.h>
|
||||||
@ -33,7 +34,7 @@ int stateTest()
|
|||||||
KeyPair myMiner = sha3("Gav's Miner");
|
KeyPair myMiner = sha3("Gav's Miner");
|
||||||
// KeyPair you = sha3("123");
|
// KeyPair you = sha3("123");
|
||||||
|
|
||||||
Defaults::setDBPath("/tmp");
|
Defaults::setDBPath(boost::filesystem::temp_directory_path().string());
|
||||||
|
|
||||||
Overlay stateDB = State::openDB();
|
Overlay stateDB = State::openDB();
|
||||||
BlockChain bc;
|
BlockChain bc;
|
||||||
|
Loading…
Reference in New Issue
Block a user