mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #5806
69465e3
cryptonote_protocol: fix '--no-sync', ignore new blocks and txes (xiphon)
This commit is contained in:
commit
902e4b6ebf
1 changed files with 3 additions and 3 deletions
|
@ -438,7 +438,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)");
|
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)
|
if(context.m_state != cryptonote_connection_context::state_normal)
|
||||||
return 1;
|
return 1;
|
||||||
if(!is_synchronized()) // can happen if a peer connection goes to normal but another thread still hasn't finished adding queued blocks
|
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
|
||||||
{
|
{
|
||||||
LOG_DEBUG_CC(context, "Received new block while syncing, ignored");
|
LOG_DEBUG_CC(context, "Received new block while syncing, ignored");
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -508,7 +508,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)");
|
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)
|
if(context.m_state != cryptonote_connection_context::state_normal)
|
||||||
return 1;
|
return 1;
|
||||||
if(!is_synchronized()) // can happen if a peer connection goes to normal but another thread still hasn't finished adding queued blocks
|
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
|
||||||
{
|
{
|
||||||
LOG_DEBUG_CC(context, "Received new block while syncing, ignored");
|
LOG_DEBUG_CC(context, "Received new block while syncing, ignored");
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -899,7 +899,7 @@ namespace cryptonote
|
||||||
// while syncing, core will lock for a long time, so we ignore
|
// while syncing, core will lock for a long time, so we ignore
|
||||||
// those txes as they aren't really needed anyway, and avoid a
|
// those txes as they aren't really needed anyway, and avoid a
|
||||||
// long block before replying
|
// long block before replying
|
||||||
if(!is_synchronized())
|
if(!is_synchronized() || m_no_sync)
|
||||||
{
|
{
|
||||||
LOG_DEBUG_CC(context, "Received new tx while syncing, ignored");
|
LOG_DEBUG_CC(context, "Received new tx while syncing, ignored");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue