mirror of
https://github.com/monero-project/monero.git
synced 2025-08-02 13:16:08 -04:00
Relay transactions when they linger too long in the pool
The last relayed time of a transaction is maintained, and transactions will be relayed again if they are still in the pool after a certain amount of time, which increases with the transaction's age. All such transactions are resent, whether or not they originated on the local node.
This commit is contained in:
parent
0d09e15a1c
commit
932994c0cb
12 changed files with 132 additions and 35 deletions
|
@ -321,7 +321,7 @@ namespace cryptonote
|
|||
for(auto tx_blob_it = arg.b.txs.begin(); tx_blob_it!=arg.b.txs.end();tx_blob_it++)
|
||||
{
|
||||
cryptonote::tx_verification_context tvc = AUTO_VAL_INIT(tvc);
|
||||
m_core.handle_incoming_tx(*tx_blob_it, tvc, true);
|
||||
m_core.handle_incoming_tx(*tx_blob_it, tvc, true, true);
|
||||
if(tvc.m_verifivation_failed)
|
||||
{
|
||||
LOG_PRINT_CCONTEXT_L1("Block verification failed: transaction verification failed, dropping connection");
|
||||
|
@ -369,7 +369,7 @@ namespace cryptonote
|
|||
for(auto tx_blob_it = arg.txs.begin(); tx_blob_it!=arg.txs.end();)
|
||||
{
|
||||
cryptonote::tx_verification_context tvc = AUTO_VAL_INIT(tvc);
|
||||
m_core.handle_incoming_tx(*tx_blob_it, tvc, false);
|
||||
m_core.handle_incoming_tx(*tx_blob_it, tvc, false, true);
|
||||
if(tvc.m_verifivation_failed)
|
||||
{
|
||||
LOG_PRINT_CCONTEXT_L1("Tx verification failed, dropping connection");
|
||||
|
@ -548,7 +548,7 @@ namespace cryptonote
|
|||
BOOST_FOREACH(auto& tx_blob, block_entry.txs)
|
||||
{
|
||||
tx_verification_context tvc = AUTO_VAL_INIT(tvc);
|
||||
m_core.handle_incoming_tx(tx_blob, tvc, true);
|
||||
m_core.handle_incoming_tx(tx_blob, tvc, true, true);
|
||||
if(tvc.m_verifivation_failed)
|
||||
{
|
||||
LOG_ERROR_CCONTEXT("transaction verification failed on NOTIFY_RESPONSE_GET_OBJECTS, \r\ntx_id = "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue