hemilabs / heminetwork

The hemi network core daemons.
MIT License
72 stars 48 forks source link

stability and fragile test fixes #276

Closed ClaytonNorthey92 closed 1 month ago

ClaytonNorthey92 commented 1 month ago

Summary if we get multiple keystones before we mine one, there is a chance that keystones get queued up twice; we copy the known keystones on each reception, then we try to mine, but we only lock during the copying step, so keystones may be copied twice in two different go routines then mined

don't mine known keystones in goroutines, it isn't helping

use less than comparison in tests, if an rpc gets called more than the expected number of times, this is ok

add consistent (longer) timeout to tests

Changes see above

ClaytonNorthey92 commented 1 month ago

I ran this 5 times (before rebasing) and it passed each time: image