ethstorage / es-node

Golang implementation of the EthStorage node.
Other
1.15k stars 77 forks source link

Fix uint underflow when downloading metadata on multiple shard cases #301

Closed qzhodl closed 4 months ago

qzhodl commented 4 months ago

Try to fix https://github.com/ethstorage/es-node/issues/186.

The root cause is lastKvIdx is less than the first index of the current shard, which leads to the download end being less than the download first, As a result, when end - first is calculated, an underflow occurs.