mirror of
https://github.com/monero-project/monero.git
synced 2025-08-18 00:30:23 -04:00
cryptonote_core: dandelion - use local height or median height if syncing
This commit is contained in:
parent
9c1562c038
commit
a9cd5d914e
10 changed files with 85 additions and 18 deletions
|
@ -430,7 +430,7 @@ namespace cryptonote
|
|||
MLOGIF_P2P_MESSAGE(crypto::hash hash; cryptonote::block b; bool ret = cryptonote::parse_and_validate_block_from_blob(arg.b.block, b, &hash);, ret, "Received NOTIFY_NEW_BLOCK " << hash << " (height " << arg.current_blockchain_height << ", " << arg.b.txs.size() << " txes)");
|
||||
if(context.m_state != cryptonote_connection_context::state_normal)
|
||||
return 1;
|
||||
if(!is_synchronized() || m_no_sync) // can happen if a peer connection goes to normal but another thread still hasn't finished adding queued blocks
|
||||
if(!is_synchronized()) // can happen if a peer connection goes to normal but another thread still hasn't finished adding queued blocks
|
||||
{
|
||||
LOG_DEBUG_CC(context, "Received new block while syncing, ignored");
|
||||
return 1;
|
||||
|
@ -501,7 +501,7 @@ namespace cryptonote
|
|||
MLOGIF_P2P_MESSAGE(crypto::hash hash; cryptonote::block b; bool ret = cryptonote::parse_and_validate_block_from_blob(arg.b.block, b, &hash);, ret, "Received NOTIFY_NEW_FLUFFY_BLOCK " << hash << " (height " << arg.current_blockchain_height << ", " << arg.b.txs.size() << " txes)");
|
||||
if(context.m_state != cryptonote_connection_context::state_normal)
|
||||
return 1;
|
||||
if(!is_synchronized() || m_no_sync) // can happen if a peer connection goes to normal but another thread still hasn't finished adding queued blocks
|
||||
if(!is_synchronized()) // can happen if a peer connection goes to normal but another thread still hasn't finished adding queued blocks
|
||||
{
|
||||
LOG_DEBUG_CC(context, "Received new block while syncing, ignored");
|
||||
return 1;
|
||||
|
@ -929,7 +929,7 @@ namespace cryptonote
|
|||
// while syncing, core will lock for a long time, so we ignore
|
||||
// those txes as they aren't really needed anyway, and avoid a
|
||||
// long block before replying
|
||||
if(!is_synchronized() || m_no_sync)
|
||||
if(!is_synchronized())
|
||||
{
|
||||
LOG_DEBUG_CC(context, "Received new tx while syncing, ignored");
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue