Closed Leonardiae closed 4 years ago
This is an edge case which should not happen that often but lately it does because of fast block times. I see it ~10 times a day.
It looks like this is not nessecary anymore after the redesign done by @PCasafont. I'm closing this issue.
When a PoP operation is started it checks if another operation is already running by trying to aquire a lock. It turns out that this is not always the best solution. Maybe it's possible to add a check like this (https://github.com/VeriBlock/nodecore/commit/5ddc43126f9e3765c8502355db61caefc4057f1e) when starting a new operation.
Below you find a part of nodecore-pop logging (with some extra logging I added). Operation 84d402a2 is started at 16:53:18.790. Operation 0a7947d5 is started at 16:53:19.798. It tries to acquire a lock which is succesfull because the previous transaction is released soon after this operation is started. I think it's better to wait until the broadcasting of the previous operation has been finished (successfully of failed) before a new operation is allowed to start. I believe this is function CreateBitcoinTransactionTask.