mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Merge f1a9fd627b into merged_master (Bitcoin PR bitcoin/bitcoin#28251)
This commit is contained in:
commit
b5fa48988e
9 changed files with 391 additions and 94 deletions
|
|
@ -1074,6 +1074,7 @@ bool CCoinsViewMemPool::GetCoin(const COutPoint &outpoint, Coin &coin) const {
|
|||
if (ptx) {
|
||||
if (outpoint.n < ptx->vout.size()) {
|
||||
coin = Coin(ptx->vout[outpoint.n], MEMPOOL_HEIGHT, false);
|
||||
m_non_base_coins.emplace(outpoint);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
@ -1086,8 +1087,14 @@ void CCoinsViewMemPool::PackageAddTransaction(const CTransactionRef& tx)
|
|||
{
|
||||
for (unsigned int n = 0; n < tx->vout.size(); ++n) {
|
||||
m_temp_added.emplace(COutPoint(tx->GetHash(), n), Coin(tx->vout[n], MEMPOOL_HEIGHT, false));
|
||||
m_non_base_coins.emplace(COutPoint(tx->GetHash(), n));
|
||||
}
|
||||
}
|
||||
void CCoinsViewMemPool::Reset()
|
||||
{
|
||||
m_temp_added.clear();
|
||||
m_non_base_coins.clear();
|
||||
}
|
||||
|
||||
// ELEMENTS:
|
||||
bool CCoinsViewMemPool::IsPeginSpent(const std::pair<uint256, COutPoint> &outpoint) const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue