Handle Zephyr pricing record sizes in daemon parser

This commit is contained in:
Codex Bot
2026-03-30 08:26:25 +02:00
parent a8bbb27c5c
commit 33359279a5

View File

@@ -35,6 +35,23 @@ namespace
constexpr uint8_t kTxOutToKey = 2;
constexpr uint8_t kTxOutToTaggedKey = 3;
constexpr uint8_t kTxOutToCarrotV1 = 4;
size_t zephyrPricingRecordSize(const uint8_t majorVersion)
{
if (majorVersion >= 6) {
return 144;
}
if (majorVersion >= 4) {
return 136;
}
if (majorVersion >= 3) {
return 120;
}
return 24;
}
}
void xmrig::BlockTemplate::calculateMinerTxHash(const uint8_t *prefix_begin, const uint8_t *prefix_end, uint8_t *hash)
@@ -215,8 +232,9 @@ bool xmrig::BlockTemplate::parse(bool hashes)
}
if (m_coin == Coin::ZEPHYR) {
uint8_t pricing_record[120];
ar(pricing_record);
if (!ar.skip(zephyrPricingRecordSize(m_version.first))) {
return false;
}
}
// Miner transaction begin