Skip to content

Commit 73af303

Browse files
committed
Clean up unused property "validatorEnabled"
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 <[email protected]>
1 parent 450b122 commit 73af303

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

core/peer/config.go

-10
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ var peerEndpointError error
5252
var syncStateSnapshotChannelSize int
5353
var syncStateDeltasChannelSize int
5454
var syncBlocksChannelSize int
55-
var validatorEnabled bool
5655

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

103101
securityEnabled = true
104102

@@ -161,14 +159,6 @@ func SyncBlocksChannelSize() int {
161159
return syncBlocksChannelSize
162160
}
163161

164-
// ValidatorEnabled returns the peer.validator.enabled property
165-
func ValidatorEnabled() bool {
166-
if !configurationCached {
167-
cacheConfiguration()
168-
}
169-
return validatorEnabled
170-
}
171-
172162
// SecurityEnabled returns the securityEnabled property from cached configuration
173163
func SecurityEnabled() bool {
174164
if !configurationCached {

0 commit comments

Comments
 (0)