mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-16 15:57:38 +00:00
Merge pull request #3358 from SChernykh/dev
Zephyr solo mining: handle multiple outputs
This commit is contained in:
commit
64a0ed413b
1 changed files with 23 additions and 17 deletions
|
@ -225,8 +225,12 @@ bool xmrig::BlockTemplate::parse(bool hashes)
|
|||
ar(m_height);
|
||||
ar(m_numOutputs);
|
||||
|
||||
const uint64_t expected_outputs = (m_coin == Coin::ZEPHYR) ? 2 : 1;
|
||||
if (m_numOutputs != expected_outputs) {
|
||||
if (m_coin == Coin::ZEPHYR) {
|
||||
if (m_numOutputs < 2) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (m_numOutputs != 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -252,6 +256,7 @@ bool xmrig::BlockTemplate::parse(bool hashes)
|
|||
ar.skip(asset_type_len);
|
||||
ar(m_viewTag);
|
||||
|
||||
for (uint64_t k = 1; k < m_numOutputs; ++k) {
|
||||
uint64_t amount2;
|
||||
ar(amount2);
|
||||
|
||||
|
@ -270,6 +275,7 @@ bool xmrig::BlockTemplate::parse(bool hashes)
|
|||
uint8_t view_tag2;
|
||||
ar(view_tag2);
|
||||
}
|
||||
}
|
||||
else if (m_outputType == 3) {
|
||||
ar(m_viewTag);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue