neoneo-go/pkg/core/block
Roman Khimov 8bb1ecb45a network: remove priority queue from block queue
Use circular buffer which is a bit more appropriate. The problem is that
priority queue accepts and stores equal items which wastes memory even in
normal usage scenario, but it's especially dangerous if the node is stuck for
some reason. In this case it'll accept from peers and put into queue the same
blocks again and again leaking memory up to OOM condition.

Notice that queue length calculation might be wrong in case circular buffer
wraps, but it's not very likely to happen (usually blocks not coming from the
queue are added by consensus and it's not very fast in doing so).
2021-11-01 11:49:01 +03:00
..
block.go network: remove priority queue from block queue 2021-11-01 11:49:01 +03:00
block_test.go network: remove priority queue from block queue 2021-11-01 11:49:01 +03:00
doc.go *: add more package-specific documentation 2021-03-19 16:18:45 +03:00
header.go core: marshal Block.Nonce in upper-case hex 2021-09-09 15:52:51 +03:00
header_test.go block: replace Base with Header 2021-03-10 13:38:44 +03:00
helper_test.go block: drop Network from the Header 2021-03-26 13:45:18 +03:00