add support for townforge (monero fork using randomx)

This commit is contained in:
moneromooo-monero 2023-12-23 15:31:05 +00:00
parent 592b0c9c76
commit c50369d65d
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
4 changed files with 44 additions and 1 deletions

View file

@ -207,7 +207,8 @@ bool xmrig::BlockTemplate::parse(bool hashes)
setOffset(MINER_TX_PREFIX_OFFSET, ar.index());
ar(m_txVersion);
ar(m_unlockTime);
if (m_coin != Coin::TOWNFORGE)
ar(m_unlockTime);
ar(m_numInputs);
// must be 1 input
@ -280,6 +281,9 @@ bool xmrig::BlockTemplate::parse(bool hashes)
ar(m_viewTag);
}
if (m_coin == Coin::TOWNFORGE)
ar(m_unlockTime);
ar(m_extraSize);
setOffset(TX_EXTRA_OFFSET, ar.index());
@ -335,6 +339,10 @@ bool xmrig::BlockTemplate::parse(bool hashes)
uint8_t vin_rct_type = 0;
ar(vin_rct_type);
// no way I'm parsing a full game update here
if (m_coin == Coin::TOWNFORGE && m_height % 720 == 0)
return true;
// must be RCTTypeNull (0)
if (vin_rct_type != 0) {
return false;