0

How does monero know the height to which it was previously synced? Where does it store this data so that it can continue syncing from there the next time?

1 Answer 1

1

How does monerod decide from which height it should start syncing? How does monero know the height to which it was previously synced?

It looks at the height of the blockchain it has already stored. If peers are advertising a higher height, it knows it has blocks to sync, to catch-up.

Where can I find this in monero code?

Mostly in src/cryptonote_protocol/cryptonote_protocol_handler.inl (grep 'height()')

Where does it store this data so that it can continue syncing from there the next time?

The blockchain database. When a block is fetched and validated, it gets added to the local blockchain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.