aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet/simplewallet.cpp
diff options
context:
space:
mode:
authorj-berman <justinberman@protonmail.com>2025-12-11 21:32:23 -0800
committerj-berman <justinberman@protonmail.com>2025-12-11 21:37:20 -0800
commitd8d3cf97300480b9d3942c667978dd4860b76feb (patch)
treeb9a58cca4fb8e9fd5576d1ef7b62415a119c803f /src/simplewallet/simplewallet.cpp
parentae08557f713a41f3f7267fcb08bbbe87f18d7932 (diff)
downloadmonzero-core-d8d3cf97300480b9d3942c667978dd4860b76feb.tar.gz
monzero-core-d8d3cf97300480b9d3942c667978dd4860b76feb.tar.xz
monzero-core-d8d3cf97300480b9d3942c667978dd4860b76feb.zip
p2p: fix race causing dropped connections during sync
Without this commit: 1) read height from DB 2) add block to chain in separate thread 3) read chain for block id's and request them from peer 4) ERR in handle_response_chain_entry, peer's first block is the one that was added to the chain, which has block idx=height from step 1. This commit reads the chain for height and highest block id's in one go while holding the m_blockchain_lock to avoid the race.
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
0 files changed, 0 insertions, 0 deletions