iotaledger / iota-core

Apache License 2.0
60 stars 12 forks source link

Fix scheduler bug and add panics #946

Closed cyberphysic4l closed 5 months ago

cyberphysic4l commented 5 months ago

Possible fix for #936 When issuer queues were removed, there was a possibility that the overall buffer size would not decrease by the correct amount do to use of PopFront() in the removeIssuer() function, where the issuer queue size was decreased, but not the overall buffer size. This is now fixed by not using PopFront in this place.

Also some panics have been added in places where we check for conditions that should never occur. Rather than return nil or some empty value, we should panic in such cases to detect the problem early.