nspcc-dev / neo-go

Go Node and SDK for the Neo blockchain
MIT License
123 stars 79 forks source link

Improve index files parsing for BlockFetcher service #3585

Open AnnaShaleva opened 2 months ago

AnnaShaleva commented 2 months ago

Is your feature request related to a problem? Please describe.

Problem is described in https://github.com/nspcc-dev/neo-go/pull/3515#discussion_r1751411244. If request timeout configuration is small, then OID-reading routine may fail due to request context timeout. I'd not consider this behaviour as a bug, but at the same time it's something that can be improved.

Describe the solution you'd like

The only thing that came to my mind is to make the receiver channel's buffer size be multiple of index file size in order to avoid possible awaiting on "send to OID channel" operation in the middle of index file parsing.

Describe alternatives you've considered

Other alternatives are welcomed.