Skip to content

Commit 7c908df

Browse files
FAB-2486 remove sync from core.yaml
remove sync block from core.yaml and related accessors that are no longer used. Change-Id: I00ba23cf24a13afeee8e66d151146649b6df7b65 Signed-off-by: Christopher Ferris <[email protected]>
1 parent 8ace5b4 commit 7c908df

File tree

2 files changed

+0
-58
lines changed

2 files changed

+0
-58
lines changed

core/peer/config.go

-31
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ var peerEndpoint *pb.PeerEndpoint
5252
var peerEndpointError error
5353

5454
// Cached values of commonly used configuration constants.
55-
var syncStateSnapshotChannelSize int
56-
var syncStateDeltasChannelSize int
57-
var syncBlocksChannelSize int
5855

5956
// Note: There is some kind of circular import issue that prevents us from
6057
// importing the "core" package into the "peer" package. The
@@ -97,10 +94,6 @@ func CacheConfiguration() (err error) {
9794
localAddress, localAddressError = getLocalAddress()
9895
peerEndpoint, peerEndpointError = getPeerEndpoint()
9996

100-
syncStateSnapshotChannelSize = viper.GetInt("peer.sync.state.snapshot.channelSize")
101-
syncStateDeltasChannelSize = viper.GetInt("peer.sync.state.deltas.channelSize")
102-
syncBlocksChannelSize = viper.GetInt("peer.sync.blocks.channelSize")
103-
10497
securityEnabled = true
10598

10699
configurationCached = true
@@ -138,30 +131,6 @@ func GetPeerEndpoint() (*pb.PeerEndpoint, error) {
138131
return peerEndpoint, peerEndpointError
139132
}
140133

141-
// SyncStateSnapshotChannelSize returns the peer.sync.state.snapshot.channelSize property
142-
func SyncStateSnapshotChannelSize() int {
143-
if !configurationCached {
144-
cacheConfiguration()
145-
}
146-
return syncStateSnapshotChannelSize
147-
}
148-
149-
// SyncStateDeltasChannelSize returns the peer.sync.state.deltas.channelSize property
150-
func SyncStateDeltasChannelSize() int {
151-
if !configurationCached {
152-
cacheConfiguration()
153-
}
154-
return syncStateDeltasChannelSize
155-
}
156-
157-
// SyncBlocksChannelSize returns the peer.sync.blocks.channelSize property
158-
func SyncBlocksChannelSize() int {
159-
if !configurationCached {
160-
cacheConfiguration()
161-
}
162-
return syncBlocksChannelSize
163-
}
164-
165134
// SecurityEnabled returns the securityEnabled property from cached configuration
166135
func SecurityEnabled() bool {
167136
if !configurationCached {

sampleconfig/core.yaml

-27
Original file line numberDiff line numberDiff line change
@@ -146,33 +146,6 @@ peer:
146146
# Time between peer sends propose message and declare itself as a leader (sends declaration message) (unit: second)
147147
leaderElectionDuration: 5s
148148

149-
# Sync related configuration
150-
sync:
151-
blocks:
152-
# Channel size for readonly SyncBlocks messages channel for receiving
153-
# blocks from oppositie Peer Endpoints.
154-
# NOTE: currently messages are not stored and forwarded, but rather
155-
# lost if the channel write blocks.
156-
channelSize: 10
157-
state:
158-
snapshot:
159-
# Channel size for readonly syncStateSnapshot messages channel
160-
# for receiving state deltas for snapshot from oppositie Peer Endpoints.
161-
# NOTE: when the channel is exhausted, the writes block for up to the
162-
# writeTimeout specified below
163-
channelSize: 50
164-
# Write timeout for the syncStateSnapshot messages
165-
# When the channel above is exhausted, messages block before being
166-
# discarded for this amount of time
167-
writeTimeout: 60s
168-
deltas:
169-
# Channel size for readonly syncStateDeltas messages channel for
170-
# receiving state deltas for a syncBlockRange from oppositie
171-
# Peer Endpoints.
172-
# NOTE: currently messages are not stored and forwarded,
173-
# but rather lost if the channel write blocks.
174-
channelSize: 20
175-
176149
# Validator defines whether this peer is a validating peer or not, and if
177150
# it is enabled, what consensus plugin to load
178151
events:

0 commit comments

Comments
 (0)