Skip to content

Commit

Permalink
Clean up unused property "validatorEnabled"
Browse files Browse the repository at this point in the history
Since the peer.validator.enabled property has been removed from
core.yaml, this should also be cleaned up. Right now the only
place uses this is core/peer/config.go

Change-Id: I52d11f8ddfb6fd5ab103d0876a1e0ab41f3d8af1
Signed-off-by: Hangyu Li <li.hangyu@jp.fujitsu.com>
  • Loading branch information
lihangyu committed Mar 9, 2017
1 parent 450b122 commit 73af303
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions core/peer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ var peerEndpointError error
var syncStateSnapshotChannelSize int
var syncStateDeltasChannelSize int
var syncBlocksChannelSize int
var validatorEnabled bool

// Note: There is some kind of circular import issue that prevents us from
// importing the "core" package into the "peer" package. The
Expand Down Expand Up @@ -98,7 +97,6 @@ func CacheConfiguration() (err error) {
syncStateSnapshotChannelSize = viper.GetInt("peer.sync.state.snapshot.channelSize")
syncStateDeltasChannelSize = viper.GetInt("peer.sync.state.deltas.channelSize")
syncBlocksChannelSize = viper.GetInt("peer.sync.blocks.channelSize")
validatorEnabled = viper.GetBool("peer.validator.enabled")

securityEnabled = true

Expand Down Expand Up @@ -161,14 +159,6 @@ func SyncBlocksChannelSize() int {
return syncBlocksChannelSize
}

// ValidatorEnabled returns the peer.validator.enabled property
func ValidatorEnabled() bool {
if !configurationCached {
cacheConfiguration()
}
return validatorEnabled
}

// SecurityEnabled returns the securityEnabled property from cached configuration
func SecurityEnabled() bool {
if !configurationCached {
Expand Down

0 comments on commit 73af303

Please sign in to comment.