Skip to content

Commit

Permalink
Merge "Use ASN1DER for TxID hashing instead of Protobuf"
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanLevi authored and Gerrit Code Review committed Aug 23, 2016
2 parents d077a0c + 64311bc commit 1d8e305
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions bddtests/peer_basic.feature
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,6 @@ Feature: Network of Peers

# @doNotDecompose
# @wip
# sha256 = '53a54f606b9cc14ae2825cc50736b183cf8d6fd0131b9d3176997efcf77d775f'
# calculated using all the args
Scenario: chaincode map single peer content generated ID
Given we compose "docker-compose-1.yml"
When requesting "/chain" from "vp0"
Expand All @@ -366,7 +364,7 @@ Feature: Network of Peers
| a | 10 |
Then I should have received a transactionID
Then I wait up to "25" seconds for transaction to be committed to all peers
Then I check the transaction ID if it is "a97267efe0391a5c0be28f79e8cb7f841aca1b952f028ec796b61c92aef6936c"
Then I check the transaction ID if it is "73b88d92d86502eb66288f84fafae848fed0d21790f2ef1475850f4b635c47f0"

Scenario: chaincode example 01 single peer rejection message
Given we compose "docker-compose-1-exp.yml"
Expand Down
4 changes: 2 additions & 2 deletions core/devops.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func (d *Devops) invokeOrQuery(ctx context.Context, chaincodeInvocationSpec *pb.
var generr error
if invoke {
if customIDgenAlg != "" {
ctorbytes, merr := proto.Marshal(chaincodeInvocationSpec.ChaincodeSpec.CtorMsg)
ctorbytes, merr := asn1.Marshal(*chaincodeInvocationSpec.ChaincodeSpec.CtorMsg)
if merr != nil {
return nil, fmt.Errorf("Error marshalling constructor: %s", merr)
}
Expand Down Expand Up @@ -456,7 +456,7 @@ func (d *Devops) EXP_ExecuteWithBinding(ctx context.Context, executeWithBinding
return &pb.Response{Status: pb.Response_FAILURE, Msg: []byte(err.Error())}, nil
}

ctorbytes, merr := proto.Marshal(executeWithBinding.ChaincodeInvocationSpec.ChaincodeSpec.CtorMsg)
ctorbytes, merr := asn1.Marshal(*executeWithBinding.ChaincodeInvocationSpec.ChaincodeSpec.CtorMsg)
if merr != nil {
return nil, fmt.Errorf("Error marshalling constructor: %s", err)
}
Expand Down

0 comments on commit 1d8e305

Please sign in to comment.