Skip to content

Commit c86e3d8

Browse files
Fix some golint errors
Fixes golint errors in core and peer package revert reverted change address review comments Change-Id: I6c5a8ade6c7be80acfabe3d4198a3489a2882904 Signed-off-by: Christopher Ferris <[email protected]>
1 parent 0716064 commit c86e3d8

File tree

5 files changed

+53
-51
lines changed

5 files changed

+53
-51
lines changed

core/peer/config.go

+2
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ func GetLocalAddress() (string, error) {
135135
return localAddress, localAddressError
136136
}
137137

138+
// GetPeerEndpoint returns peerEndpoint from cached configuration
138139
func GetPeerEndpoint() (*pb.PeerEndpoint, error) {
139140
if !configurationCached {
140141
cacheConfiguration()
@@ -174,6 +175,7 @@ func ValidatorEnabled() bool {
174175
return validatorEnabled
175176
}
176177

178+
// SecurityEnabled returns the securityEnabled property from cached configuration
177179
func SecurityEnabled() bool {
178180
if !configurationCached {
179181
cacheConfiguration()

core/peer/handler.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -531,8 +531,8 @@ func (d *Handler) sendStateSnapshot(syncStateSnapshotRequest *pb.SyncStateSnapsh
531531
for i := 0; snapshot.Next(); i++ {
532532
delta := statemgmt.NewStateDelta()
533533
k, v := snapshot.GetRawKeyValue()
534-
cID, kID := statemgmt.DecodeCompositeKey(k)
535-
delta.Set(cID, kID, v, nil)
534+
cID, keyID := statemgmt.DecodeCompositeKey(k)
535+
delta.Set(cID, keyID, v, nil)
536536

537537
deltaAsBytes := delta.Marshal()
538538
// Encode a SyncStateSnapsot into the payload

0 commit comments

Comments
 (0)