Skip to content

Commit

Permalink
Fix some golint errors
Browse files Browse the repository at this point in the history
Fixes golint errors in core and peer package
revert reverted change
address review comments

Change-Id: I6c5a8ade6c7be80acfabe3d4198a3489a2882904
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
  • Loading branch information
christo4ferris committed Jul 30, 2016
1 parent 0716064 commit c86e3d8
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 51 deletions.
2 changes: 2 additions & 0 deletions core/peer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ func GetLocalAddress() (string, error) {
return localAddress, localAddressError
}

// GetPeerEndpoint returns peerEndpoint from cached configuration
func GetPeerEndpoint() (*pb.PeerEndpoint, error) {
if !configurationCached {
cacheConfiguration()
Expand Down Expand Up @@ -174,6 +175,7 @@ func ValidatorEnabled() bool {
return validatorEnabled
}

// SecurityEnabled returns the securityEnabled property from cached configuration
func SecurityEnabled() bool {
if !configurationCached {
cacheConfiguration()
Expand Down
4 changes: 2 additions & 2 deletions core/peer/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,8 @@ func (d *Handler) sendStateSnapshot(syncStateSnapshotRequest *pb.SyncStateSnapsh
for i := 0; snapshot.Next(); i++ {
delta := statemgmt.NewStateDelta()
k, v := snapshot.GetRawKeyValue()
cID, kID := statemgmt.DecodeCompositeKey(k)
delta.Set(cID, kID, v, nil)
cID, keyID := statemgmt.DecodeCompositeKey(k)
delta.Set(cID, keyID, v, nil)

deltaAsBytes := delta.Marshal()
// Encode a SyncStateSnapsot into the payload
Expand Down

0 comments on commit c86e3d8

Please sign in to comment.