File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 6666 ErrNoRunningNode = errors .New ("there is no running node" )
6767)
6868
69- // FIXME: This is temporal and will be replaced with the actual setting
70- const privateMode = false
71-
7269// StatusNode abstracts contained geth node and provides helper methods to
7370// interact with it.
7471type StatusNode struct {
Original file line number Diff line number Diff line change @@ -411,8 +411,18 @@ func (b *StatusNode) personalService() *personal.Service {
411411}
412412
413413func (b * StatusNode ) TimeSource () timesource.Provider {
414+ accDB , err := accounts .NewDB (b .appDB )
415+ if err != nil {
416+ b .logger .Error ("failed to get if thirdparty services are enabled" , zap .Error (err ))
417+ return nil
418+ }
414419 if b .timeSourceSrvc == nil {
415- if privateMode {
420+ thirdpartyServicesEnabled , err := accDB .ThirdpartyServicesEnabled ()
421+ if err != nil {
422+ b .logger .Error ("failed to get if thirdparty services are enabled" , zap .Error (err ))
423+ return nil
424+ }
425+ if thirdpartyServicesEnabled {
416426 b .timeSourceSrvc = timesource .LocalService ()
417427 } else {
418428 b .timeSourceSrvc = timesource .DefaultService ()
You can’t perform that action at this time.
0 commit comments