Skip to content

Commit

Permalink
Print out results in peer
Browse files Browse the repository at this point in the history
Change-Id: I65cb38edc245079d6eec0ae49a24dd6379ff1c28
Signed-off-by: Gabor Hosszu <gabor@digitalasset.com>
  • Loading branch information
gaborh-da committed Aug 12, 2016
1 parent 457635a commit 2ef5a39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions peer/chaincode/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,13 @@ func chaincodeInvokeOrQuery(cmd *cobra.Command, args []string, invoke bool) (err
err = errors.New("Options --raw (-r) and --hex (-x) are not compatible\n")
return
}
fmt.Print("Query Result (Raw): ")
os.Stdout.Write(resp.Msg)
} else {
if chaincodeQueryHex {
logger.Debugf("%x\n", resp.Msg)
fmt.Printf("Query Result: %x\n", resp.Msg)
} else {
logger.Debug(string(resp.Msg))
fmt.Printf("Query Result: %s\n", string(resp.Msg))
}
}
}
Expand Down

0 comments on commit 2ef5a39

Please sign in to comment.