mirror of
https://github.com/SChernykh/p2pool.git
synced 2025-01-10 20:54:34 +00:00
Use p2pool-api branch for Monero
This commit is contained in:
parent
37f3312e1d
commit
4ba32277c1
2 changed files with 8 additions and 8 deletions
|
@ -60,7 +60,7 @@ monerod binary compatible with p2pool:
|
||||||
sudo apt update && sudo apt install git build-essential cmake pkg-config libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev libexpat1-dev libpgm-dev qttools5-dev-tools libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler libudev-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-locale-dev libboost-program-options-dev libboost-regex-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev ccache doxygen graphviz
|
sudo apt update && sudo apt install git build-essential cmake pkg-config libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev libexpat1-dev libpgm-dev qttools5-dev-tools libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler libudev-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-locale-dev libboost-program-options-dev libboost-regex-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev ccache doxygen graphviz
|
||||||
git clone https://github.com/SChernykh/monero
|
git clone https://github.com/SChernykh/monero
|
||||||
cd monero
|
cd monero
|
||||||
git checkout zmq-changes
|
git checkout p2pool-api
|
||||||
git submodule init && git submodule update
|
git submodule init && git submodule update
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
```
|
```
|
||||||
|
|
|
@ -90,7 +90,7 @@ void ZMQReader::run()
|
||||||
m_subscriber.connect(addr);
|
m_subscriber.connect(addr);
|
||||||
|
|
||||||
m_subscriber.set(zmq::sockopt::subscribe, "json-full-chain_main");
|
m_subscriber.set(zmq::sockopt::subscribe, "json-full-chain_main");
|
||||||
m_subscriber.set(zmq::sockopt::subscribe, "json-miner-data");
|
m_subscriber.set(zmq::sockopt::subscribe, "json-full-miner_data");
|
||||||
m_subscriber.set(zmq::sockopt::subscribe, "json-minimal-txpool_add");
|
m_subscriber.set(zmq::sockopt::subscribe, "json-minimal-txpool_add");
|
||||||
|
|
||||||
LOGINFO(1, "worker thread ready");
|
LOGINFO(1, "worker thread ready");
|
||||||
|
@ -159,9 +159,9 @@ void ZMQReader::parse(char* data, size_t size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (strcmp(data, "json-miner-data") == 0) {
|
else if (strcmp(data, "json-full-miner_data") == 0) {
|
||||||
if (!doc.IsObject()) {
|
if (!doc.IsObject()) {
|
||||||
LOGWARN(1, "json-miner-data is not an object, skipping it");
|
LOGWARN(1, "json-full-miner_data is not an object, skipping it");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,19 +172,19 @@ void ZMQReader::parse(char* data, size_t size)
|
||||||
!PARSE(doc, m_minerData, median_weight) ||
|
!PARSE(doc, m_minerData, median_weight) ||
|
||||||
!PARSE(doc, m_minerData, already_generated_coins) ||
|
!PARSE(doc, m_minerData, already_generated_coins) ||
|
||||||
!PARSE(doc, m_minerData, difficulty)) {
|
!PARSE(doc, m_minerData, difficulty)) {
|
||||||
LOGWARN(1, "json-miner-data failed to parse, skipping it");
|
LOGWARN(1, "json-full-miner_data failed to parse, skipping it");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!doc.HasMember("tx_backlog")) {
|
if (!doc.HasMember("tx_backlog")) {
|
||||||
LOGWARN(1, "json-miner-data doesn't have 'tx_backlog', skipping it");
|
LOGWARN(1, "json-full-miner_data doesn't have 'tx_backlog', skipping it");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto& tx_backlog = doc["tx_backlog"];
|
const auto& tx_backlog = doc["tx_backlog"];
|
||||||
|
|
||||||
if (!tx_backlog.IsArray()) {
|
if (!tx_backlog.IsArray()) {
|
||||||
LOGWARN(1, "'tx_backlog' in json-miner-data is not an array, skipping it");
|
LOGWARN(1, "'tx_backlog' in json-full-miner_data is not an array, skipping it");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ void ZMQReader::parse(char* data, size_t size)
|
||||||
m_minerData.tx_backlog.push_back(m_tx);
|
m_minerData.tx_backlog.push_back(m_tx);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LOGWARN(1, "transaction #" << (i + 1) << " in json-miner-data `tx_backlog` failed to parse, skipped it");
|
LOGWARN(1, "transaction #" << (i + 1) << " in json-full-miner_data `tx_backlog` failed to parse, skipped it");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue