mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 07:37:20 +00:00
If Geth is engaged in a long-run block synchronization, such as a full syncing over a large number of blocks, invoking `debug_setHead` will cause `downloader.Cancel` to wait for all fetchers to stop first. This can be time-consuming, particularly for the block processing thread. To address this, we manually call `blockchain.StopInsert` to interrupt the blocking processing thread and allow it to exit immediately, and after that call `blockchain.ResumeInsert` to resume the block downloading process. Additionally, we add a sanity check for the input block number of `debug_setHead` to ensure its validity. --------- Signed-off-by: jsvisa <delweng@gmail.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> |
||
|---|---|---|
| .. | ||
| blocktest | ||
| build | ||
| cmdtest | ||
| debug | ||
| download | ||
| era | ||
| ethapi | ||
| flags | ||
| guide | ||
| jsre | ||
| reexec | ||
| shutdowncheck | ||
| syncx | ||
| testlog | ||
| testrand | ||
| utesting | ||
| version | ||
| web3ext | ||