0chain / 0dns

A DNS service for 0Chain clients
MIT License
5 stars 8 forks source link

Config is not thread safe #39

Closed peterlimg closed 2 years ago

peterlimg commented 2 years ago

The config is not thread safe, the Config.CurrentMagicBlock , Config.Miners, Config.Sharders, etc all are being updated and read concurrently with out lock protecting.

We should separate the data that will be updated periodically from the Config struct. Config should only hold static configuration data that is loaded on starts.