item not fund error was reported when synchronizing the block, and then the connection was disconnected. The log is as follows.
Motivation
To increase the stability of the network, it is necessary to eliminate these abnormal disconnections.
Implementation
This problem caused by multi-threaded concurrency. When processing the sync block chain message, the headblock is updated to 41958141, but the block is not stored in the DB. At this time, when 41958163 is queried, an exception is thrown.
The solution is to handle the headblock specially. When querying the headblock, do not query the database.
Simple Summary
item not fund
error was reported when synchronizing the block, and then the connection was disconnected. The log is as follows.Motivation
To increase the stability of the network, it is necessary to eliminate these abnormal disconnections.
Implementation
This problem caused by multi-threaded concurrency. When processing the sync block chain message, the headblock is updated to 41958141, but the block is not stored in the DB. At this time, when 41958163 is queried, an exception is thrown.
The solution is to handle the headblock specially. When querying the headblock, do not query the database.