Skip to content

Commit

Permalink
Merge "check transaction amount"
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborh-da authored and Gerrit Code Review committed Sep 9, 2016
2 parents f7f5dc3 + 180bd72 commit ad194b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface, function stri

// Perform the execution
X, err = strconv.Atoi(args[2])
if err != nil {
return nil, errors.New("Invalid transaction amount, expecting a integer value")
}
Aval = Aval - X
Bval = Bval + X
fmt.Printf("Aval = %d, Bval = %d\n", Aval, Bval)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type SimpleChaincode struct {
func (t *SimpleChaincode) GetChaincodeToCall() string {
//This is the hashcode for github.com/hyperledger/fabric/core/example/chaincode/chaincode_example02
//if the example is modifed this hashcode will change!!
chainCodeToCall := "980d4bb7f69578592e5775a6da86d81a221887817d7164d3e9d4d4df1c981440abf9a61417eaf8ad6f7fc79893da36de2cf4709131e9af39bca6ebc2e5a1cd9d"
chainCodeToCall := "ee5b24a1f17c356dd5f6e37307922e39ddba12e5d2e203ed93401d7d05eb0dd194fb9070549c5dc31eb63f4e654dbd5a1d86cbb30c48e3ab1812590cd0f78539"
return chainCodeToCall
}

Expand Down

0 comments on commit ad194b2

Please sign in to comment.