From cddb2920a97db9a80bcb724e55e9bf5e7fe89166 Mon Sep 17 00:00:00 2001 From: subtly Date: Sun, 22 Mar 2015 20:38:27 +0100 Subject: [PATCH] namespace eth network-protocol version for implemenations --- alethzero/MainWin.cpp | 4 ++-- eth/main.cpp | 2 +- libethereum/Client.cpp | 4 ++-- libethereum/State.cpp | 2 +- neth/main.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp index dfd439816..d5e81a4f5 100644 --- a/alethzero/MainWin.cpp +++ b/alethzero/MainWin.cpp @@ -145,7 +145,7 @@ Main::Main(QWidget *parent) : cerr << "Block Hash: " << CanonBlockChain::genesis().hash << endl; cerr << "Block RLP: " << RLP(block) << endl; cerr << "Block Hex: " << toHex(block) << endl; - cerr << "Network protocol version: " << c_protocolVersion << endl; + cerr << "eth Network protocol version: " << eth::c_protocolVersion << endl; cerr << "Client database version: " << c_databaseVersion << endl; ui->configDock->close(); @@ -1059,7 +1059,7 @@ void Main::refreshBlockCount() { cwatch << "refreshBlockCount()"; auto d = ethereum()->blockChain().details(); - ui->blockCount->setText(QString("%4 #%1 PV%2 D%3 H%5").arg(d.number).arg(c_protocolVersion).arg(c_databaseVersion).arg(m_privateChain.size() ? "[" + m_privateChain + "] " : "testnet").arg(c_ethashVersion)); + ui->blockCount->setText(QString("%4 #%1 PV%2 D%3 H%5").arg(d.number).arg(eth::c_protocolVersion).arg(c_databaseVersion).arg(m_privateChain.size() ? "[" + m_privateChain + "] " : "testnet").arg(c_ethashVersion)); } void Main::on_turboMining_triggered() diff --git a/eth/main.cpp b/eth/main.cpp index ce89e8ddf..eda6e12ae 100644 --- a/eth/main.cpp +++ b/eth/main.cpp @@ -160,7 +160,7 @@ string credits(bool _interactive = false) void version() { cout << "eth version " << dev::Version << endl; - cout << "Network protocol version: " << dev::eth::c_protocolVersion << endl; + cout << "eth network protocol version: " << dev::eth::c_protocolVersion << endl; cout << "Client database version: " << dev::eth::c_databaseVersion << endl; cout << "Build: " << DEV_QUOTED(ETH_BUILD_PLATFORM) << "/" << DEV_QUOTED(ETH_BUILD_TYPE) << endl; exit(0); diff --git a/libethereum/Client.cpp b/libethereum/Client.cpp index 6725d1560..883b7f615 100644 --- a/libethereum/Client.cpp +++ b/libethereum/Client.cpp @@ -40,7 +40,7 @@ VersionChecker::VersionChecker(string const& _dbPath): { auto protocolContents = contents(m_path + "/protocol"); auto databaseContents = contents(m_path + "/database"); - m_ok = RLP(protocolContents).toInt(RLP::LaisezFaire) == c_protocolVersion && RLP(databaseContents).toInt(RLP::LaisezFaire) == c_databaseVersion; + m_ok = RLP(protocolContents).toInt(RLP::LaisezFaire) == eth::c_protocolVersion && RLP(databaseContents).toInt(RLP::LaisezFaire) == c_databaseVersion; } void VersionChecker::setOk() @@ -55,7 +55,7 @@ void VersionChecker::setOk() { cwarn << "Unhandled exception! Failed to create directory: " << m_path << "\n" << boost::current_exception_diagnostic_information(); } - writeFile(m_path + "/protocol", rlp(c_protocolVersion)); + writeFile(m_path + "/protocol", rlp(eth::c_protocolVersion)); writeFile(m_path + "/database", rlp(c_databaseVersion)); } } diff --git a/libethereum/State.cpp b/libethereum/State.cpp index 0d2b3a93e..c5732116d 100644 --- a/libethereum/State.cpp +++ b/libethereum/State.cpp @@ -1040,7 +1040,7 @@ LastHashes State::getLastHashes(BlockChain const& _bc, unsigned _n) const { LastHashes ret; ret.resize(256); - if (c_protocolVersion > 49) + if (eth::c_protocolVersion > 49) { ret[0] = _bc.numberHash(_n); for (unsigned i = 1; i < 256; ++i) diff --git a/neth/main.cpp b/neth/main.cpp index 275ac3ea4..9ea28a83e 100644 --- a/neth/main.cpp +++ b/neth/main.cpp @@ -134,7 +134,7 @@ string credits() void version() { cout << "neth version " << dev::Version << endl; - cout << "Network protocol version: " << dev::eth::c_protocolVersion << endl; + cout << "eth network protocol version: " << dev::eth::c_protocolVersion << endl; cout << "Client database version: " << dev::eth::c_databaseVersion << endl; cout << "Build: " << DEV_QUOTED(ETH_BUILD_PLATFORM) << "/" << DEV_QUOTED(ETH_BUILD_TYPE) << endl; exit(0);