Handle Zephyr pricing record sizes in daemon parser
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user