mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge pull request #4309
d38da59Code simplifications after CTransaction::GetHash() caching (Pieter Wuille)4949004Add CMutableTransaction and make CTransaction immutable. (Pieter Wuille)
This commit is contained in:
commit
d4e4e05435
27 changed files with 248 additions and 184 deletions
10
src/net.cpp
10
src/net.cpp
|
|
@ -1812,17 +1812,17 @@ instance_of_cnetcleanup;
|
|||
|
||||
|
||||
|
||||
void RelayTransaction(const CTransaction& tx, const uint256& hash)
|
||||
void RelayTransaction(const CTransaction& tx)
|
||||
{
|
||||
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ss.reserve(10000);
|
||||
ss << tx;
|
||||
RelayTransaction(tx, hash, ss);
|
||||
RelayTransaction(tx, ss);
|
||||
}
|
||||
|
||||
void RelayTransaction(const CTransaction& tx, const uint256& hash, const CDataStream& ss)
|
||||
void RelayTransaction(const CTransaction& tx, const CDataStream& ss)
|
||||
{
|
||||
CInv inv(MSG_TX, hash);
|
||||
CInv inv(MSG_TX, tx.GetHash());
|
||||
{
|
||||
LOCK(cs_mapRelay);
|
||||
// Expire old relay messages
|
||||
|
|
@ -1844,7 +1844,7 @@ void RelayTransaction(const CTransaction& tx, const uint256& hash, const CDataSt
|
|||
LOCK(pnode->cs_filter);
|
||||
if (pnode->pfilter)
|
||||
{
|
||||
if (pnode->pfilter->IsRelevantAndUpdate(tx, hash))
|
||||
if (pnode->pfilter->IsRelevantAndUpdate(tx))
|
||||
pnode->PushInventory(inv);
|
||||
} else
|
||||
pnode->PushInventory(inv);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue