Stabilize nodejs facade submissions

This commit is contained in:
Codex Bot
2026-05-07 01:15:47 +02:00
parent ba570f2de9
commit 3759b59e6b
10 changed files with 208 additions and 55 deletions
+11
View File
@@ -317,7 +317,18 @@ void MergeMiningClientJSON_RPC::submit_solution(const std::vector<uint8_t>& /*co
const std::vector<uint8_t>& aux_blob = (index < NUM_PREVIOUS_HASHES) ? m_previousAuxBlobs[index] : m_chainParams.aux_blob;
const hash& aux_hash = (index < NUM_PREVIOUS_HASHES) ? m_previousAuxHashes[index] : m_chainParams.aux_hash;
const ChainParameters chain_params = m_chainParams;
submit_solution_with_params(chain_params, aux_hash, aux_blob, seed_hash, blob, merkle_proof, merkle_proof_path);
}
void MergeMiningClientJSON_RPC::submit_solution(const ChainParameters& chain_params, const std::vector<uint8_t>& /*coinbase_merkle_proof*/, const uint8_t (&/*hashing_blob*/)[128], size_t /*nonce_offset*/, const hash& seed_hash, const std::vector<uint8_t>& blob, const std::vector<hash>& merkle_proof, uint32_t merkle_proof_path)
{
submit_solution_with_params(chain_params, chain_params.aux_hash, chain_params.aux_blob, seed_hash, blob, merkle_proof, merkle_proof_path);
}
void MergeMiningClientJSON_RPC::submit_solution_with_params(const ChainParameters& /*chain_params*/, const hash& aux_hash, const std::vector<uint8_t>& aux_blob, const hash& seed_hash, const std::vector<uint8_t>& blob, const std::vector<hash>& merkle_proof, uint32_t merkle_proof_path)
{
std::vector<char> buf((aux_blob.size() + HASH_SIZE + blob.size()) * 2 + merkle_proof.size() * (HASH_SIZE * 2 + 3) + 256);
log::Stream s(buf.data(), buf.size());