mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-22 19:39:22 +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
|
||||
git clone https://github.com/SChernykh/monero
|
||||
cd monero
|
||||
git checkout zmq-changes
|
||||
git checkout p2pool-api
|
||||
git submodule init && git submodule update
|
||||
make -j$(nproc)
|
||||
```
|
||||
|
|
|
@ -90,7 +90,7 @@ void ZMQReader::run()
|
|||
m_subscriber.connect(addr);
|
||||
|
||||
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");
|
||||
|
||||
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()) {
|
||||
LOGWARN(1, "json-miner-data is not an object, skipping it");
|
||||
LOGWARN(1, "json-full-miner_data is not an object, skipping it");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -172,19 +172,19 @@ void ZMQReader::parse(char* data, size_t size)
|
|||
!PARSE(doc, m_minerData, median_weight) ||
|
||||
!PARSE(doc, m_minerData, already_generated_coins) ||
|
||||
!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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
const auto& tx_backlog = doc["tx_backlog"];
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ void ZMQReader::parse(char* data, size_t size)
|
|||
m_minerData.tx_backlog.push_back(m_tx);
|
||||
}
|
||||
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