Sync with changes from proxy

This commit is contained in:
SChernykh 2023-04-03 15:01:40 +02:00
parent d31b3b7c76
commit 5e0079f012
5 changed files with 45 additions and 10 deletions

View file

@ -148,6 +148,11 @@ int64_t xmrig::DaemonClient::submit(const JobResult &result)
memcpy(data + sig_offset * 2, result.sig, 64 * 2);
memcpy(data + m_blocktemplate.offset(BlockTemplate::TX_PUBKEY_OFFSET) * 2, result.sig_data, 32 * 2);
memcpy(data + m_blocktemplate.offset(BlockTemplate::EPH_PUBLIC_KEY_OFFSET) * 2, result.sig_data + 32 * 2, 32 * 2);
// Handle view tag for txout_to_tagged_key outputs
if (m_blocktemplate.outputType() == 3) {
Cvt::toHex(data + m_blocktemplate.offset(BlockTemplate::EPH_PUBLIC_KEY_OFFSET) * 2 + 32 * 2, 2, &result.view_tag, 1);
}
}
if (result.extra_nonce >= 0) {
@ -404,7 +409,8 @@ bool xmrig::DaemonClient::parseJob(const rapidjson::Value &params, int *code)
m_blocktemplate.offset(BlockTemplate::TX_PUBKEY_OFFSET) - k,
m_blocktemplate.offset(BlockTemplate::TX_EXTRA_NONCE_OFFSET) - k,
m_blocktemplate.txExtraNonce().size(),
m_blocktemplate.minerTxMerkleTreeBranch()
m_blocktemplate.minerTxMerkleTreeBranch(),
m_blocktemplate.outputType() == 3
);
# endif
@ -441,7 +447,7 @@ bool xmrig::DaemonClient::parseJob(const rapidjson::Value &params, int *code)
}
uint8_t derivation[32];
if (!generate_key_derivation(m_blocktemplate.blob(BlockTemplate::TX_PUBKEY_OFFSET), secret_viewkey, derivation)) {
if (!generate_key_derivation(m_blocktemplate.blob(BlockTemplate::TX_PUBKEY_OFFSET), secret_viewkey, derivation, nullptr)) {
return jobError("Failed to generate key derivation for miner signature.");
}