Monero v15 network upgrade support
This commit is contained in:
parent
9f70752090
commit
45061f40d8
2 changed files with 8 additions and 2 deletions
|
@ -228,14 +228,19 @@ bool xmrig::BlockTemplate::parse(bool hashes)
|
||||||
ar(m_amount);
|
ar(m_amount);
|
||||||
ar(m_outputType);
|
ar(m_outputType);
|
||||||
|
|
||||||
// output type must be txout_to_key (2)
|
// output type must be txout_to_key (2) or txout_to_tagged_key (3)
|
||||||
if (m_outputType != 2) {
|
if ((m_outputType != 2) && (m_outputType != 3)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
setOffset(EPH_PUBLIC_KEY_OFFSET, ar.index());
|
setOffset(EPH_PUBLIC_KEY_OFFSET, ar.index());
|
||||||
|
|
||||||
ar(m_ephPublicKey, kKeySize);
|
ar(m_ephPublicKey, kKeySize);
|
||||||
|
|
||||||
|
if (m_outputType == 3) {
|
||||||
|
ar(m_viewTag);
|
||||||
|
}
|
||||||
|
|
||||||
ar(m_extraSize);
|
ar(m_extraSize);
|
||||||
|
|
||||||
setOffset(TX_EXTRA_OFFSET, ar.index());
|
setOffset(TX_EXTRA_OFFSET, ar.index());
|
||||||
|
|
|
@ -140,6 +140,7 @@ private:
|
||||||
uint64_t m_amount = 0;
|
uint64_t m_amount = 0;
|
||||||
uint8_t m_outputType = 0;
|
uint8_t m_outputType = 0;
|
||||||
Span m_ephPublicKey;
|
Span m_ephPublicKey;
|
||||||
|
uint8_t m_viewTag = 0;
|
||||||
uint64_t m_extraSize = 0;
|
uint64_t m_extraSize = 0;
|
||||||
Span m_txExtraNonce;
|
Span m_txExtraNonce;
|
||||||
Span m_txMergeMiningTag = 0;
|
Span m_txMergeMiningTag = 0;
|
||||||
|
|
Loading…
Reference in a new issue