You are viewing a single comment's thread from:

RE: 3rd update of 2022 on BlockTrades work on Hive software

in HiveDevs2 years ago

The write_queue is a place where the p2p thread puts stuff temporarily, so that the blockchain code can process it. When the blockchain code runs, it pops the oldest item off the queue, decides whether it is a valid transaction or not, then signals back to the p2p task that put it on the queue abou it's validity.

So these items are always being removed from the queue by the blockchain code, regardless of whether they are valid or invalid. In other words, the write_queue is just a producer/consumer buffer between the two threads.