mirror of
https://github.com/status-im/status-go.git
synced 2025-02-21 19:28:29 +00:00
Make GetNodeConfig
retrieve config from DB
Prior to this commit, this API returns the in memory `NodeConfig` which might not be the latest state. This is the case when for example clients update any `NodeConfig` and retrieve it right afterwards via `GetNodeConfig`. To get the latest state of `NodeConfig` it has to be fetched from DB instead.
This commit is contained in:
parent
5f92e84c19
commit
07c6808385
@ -718,10 +718,7 @@ func (b *GethStatusBackend) saveNodeConfig(n *params.NodeConfig) error {
|
||||
}
|
||||
|
||||
func (b *GethStatusBackend) GetNodeConfig() (*params.NodeConfig, error) {
|
||||
if b.config == nil {
|
||||
return nil, ErrConfigNotAvailable
|
||||
}
|
||||
return b.config, nil
|
||||
return nodecfg.GetNodeConfigFromDB(b.appDB)
|
||||
}
|
||||
|
||||
func (b *GethStatusBackend) startNode(config *params.NodeConfig) (err error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user