mirror of
https://github.com/SChernykh/p2pool.git
synced 2025-01-09 12:19:26 +00:00
Fixed m_txkeySecSeed in block template update
This commit is contained in:
parent
f5ac485ac8
commit
1c4806e0d7
2 changed files with 4 additions and 2 deletions
|
@ -272,8 +272,9 @@ void BlockTemplate::update(const MinerData& data, const Mempool& mempool, Wallet
|
||||||
const int sidechain_version = m_poolBlockTemplate->get_sidechain_version();
|
const int sidechain_version = m_poolBlockTemplate->get_sidechain_version();
|
||||||
|
|
||||||
if (sidechain_version <= 1) {
|
if (sidechain_version <= 1) {
|
||||||
m_poolBlockTemplate->m_txkeySecSeed = miner_wallet->spend_public_key();
|
get_tx_keys(m_poolBlockTemplate->m_txkeyPub, m_poolBlockTemplate->m_txkeySec, miner_wallet->spend_public_key(), data.prev_id);
|
||||||
get_tx_keys(m_poolBlockTemplate->m_txkeyPub, m_poolBlockTemplate->m_txkeySec, m_poolBlockTemplate->m_txkeySecSeed, data.prev_id);
|
// Both values are the same before v2
|
||||||
|
m_poolBlockTemplate->m_txkeySecSeed = m_poolBlockTemplate->m_txkeySec;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_poolBlockTemplate->m_minerWallet = *miner_wallet;
|
m_poolBlockTemplate->m_minerWallet = *miner_wallet;
|
||||||
|
|
|
@ -270,6 +270,7 @@ int PoolBlock::deserialize(const uint8_t* data, size_t size, const SideChain& si
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// Both values are the same before v2
|
||||||
m_txkeySec = m_txkeySecSeed;
|
m_txkeySec = m_txkeySecSeed;
|
||||||
|
|
||||||
// Enforce deterministic tx keys starting from v15
|
// Enforce deterministic tx keys starting from v15
|
||||||
|
|
Loading…
Reference in a new issue