mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-23 12:09:22 +00:00
Code cleanup.
This commit is contained in:
parent
35ba786e63
commit
733b85a132
1 changed files with 11 additions and 14 deletions
|
@ -245,31 +245,28 @@ bool xmrig::BlockTemplate::parse(bool hashes)
|
|||
|
||||
while (ar_extra.index() < m_extraSize) {
|
||||
uint64_t extra_tag = 0;
|
||||
uint64_t size = 0;
|
||||
|
||||
ar_extra(extra_tag);
|
||||
|
||||
switch (extra_tag) {
|
||||
case 0x01: // TX_EXTRA_TAG_PUBKEY
|
||||
{
|
||||
setOffset(TX_PUBKEY_OFFSET, offset(TX_EXTRA_OFFSET) + ar_extra.index());
|
||||
ar_extra.skip(kKeySize);
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x02: // TX_EXTRA_NONCE
|
||||
{
|
||||
uint64_t size = 0;
|
||||
ar_extra(size);
|
||||
setOffset(TX_EXTRA_NONCE_OFFSET, offset(TX_EXTRA_OFFSET) + ar_extra.index());
|
||||
ar_extra(m_txExtraNonce, size);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x03: // TX_EXTRA_MERGE_MINING_TAG
|
||||
{
|
||||
uint64_t size = 0;
|
||||
ar_extra(size);
|
||||
setOffset(TX_EXTRA_MERGE_MINING_TAG_OFFSET, offset(TX_EXTRA_OFFSET) + ar_extra.index());
|
||||
ar_extra(m_txMergeMiningTag, size + kKeySize);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
return false; // TODO(SChernykh): handle other tags
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue