1
0
mirror of https://github.com/xmrig/xmrig.git synced 2026-07-01 06:36:35 -04:00

Compare commits

..

1 Commits

Author SHA1 Message Date
Tony Butler 80649ef465 Merge 753e63cd96 into 10bfffe033 2023-10-31 14:30:30 -06:00
+18 -24
View File
@@ -198,7 +198,7 @@ bool xmrig::BlockTemplate::parse(bool hashes)
} }
if (m_coin == Coin::ZEPHYR) { if (m_coin == Coin::ZEPHYR) {
uint8_t pricing_record[120]; uint8_t pricing_record[24];
ar(pricing_record); ar(pricing_record);
} }
@@ -225,12 +225,8 @@ bool xmrig::BlockTemplate::parse(bool hashes)
ar(m_height); ar(m_height);
ar(m_numOutputs); ar(m_numOutputs);
if (m_coin == Coin::ZEPHYR) { const uint64_t expected_outputs = (m_coin == Coin::ZEPHYR) ? 2 : 1;
if (m_numOutputs < 2) { if (m_numOutputs != expected_outputs) {
return false;
}
}
else if (m_numOutputs != 1) {
return false; return false;
} }
@@ -256,25 +252,23 @@ bool xmrig::BlockTemplate::parse(bool hashes)
ar.skip(asset_type_len); ar.skip(asset_type_len);
ar(m_viewTag); ar(m_viewTag);
for (uint64_t k = 1; k < m_numOutputs; ++k) { uint64_t amount2;
uint64_t amount2; ar(amount2);
ar(amount2);
uint8_t output_type2; uint8_t output_type2;
ar(output_type2); ar(output_type2);
if (output_type2 != 2) { if (output_type2 != 2) {
return false; return false;
}
Span key2;
ar(key2, kKeySize);
ar(asset_type_len);
ar.skip(asset_type_len);
uint8_t view_tag2;
ar(view_tag2);
} }
Span key2;
ar(key2, kKeySize);
ar(asset_type_len);
ar.skip(asset_type_len);
uint8_t view_tag2;
ar(view_tag2);
} }
else if (m_outputType == 3) { else if (m_outputType == 3) {
ar(m_viewTag); ar(m_viewTag);