mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #1386
8f6ec90c
blockchain: reject invalid pubkeys from v4 (moneromooo-monero)
This commit is contained in:
commit
2fd43e25ee
1 changed files with 13 additions and 0 deletions
|
@ -2231,6 +2231,19 @@ bool Blockchain::check_tx_outputs(const transaction& tx, tx_verification_context
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// from v4, forbid invalid pubkeys
|
||||||
|
if (m_hardfork->get_current_version() >= 4) {
|
||||||
|
for (const auto &o: tx.vout) {
|
||||||
|
if (o.target.type() == typeid(txout_to_key)) {
|
||||||
|
const txout_to_key& out_to_key = boost::get<txout_to_key>(o.target);
|
||||||
|
if (!crypto::check_key(out_to_key.key)) {
|
||||||
|
tvc.m_invalid_output = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue