@@ -27,7 +27,6 @@ import (
27
27
"github.com/hyperledger/fabric/core/scc/lscc"
28
28
"github.com/hyperledger/fabric/protos/common"
29
29
"github.com/hyperledger/fabric/protos/ledger/rwset/kvrwset"
30
- "github.com/hyperledger/fabric/protos/msp"
31
30
pb "github.com/hyperledger/fabric/protos/peer"
32
31
"github.com/hyperledger/fabric/protos/utils"
33
32
"github.com/pkg/errors"
@@ -619,41 +618,6 @@ func (vscc *Validator) getInstantiatedCC(chid, ccid string) (cd *ccprovider.Chai
619
618
return
620
619
}
621
620
622
- func (vscc * Validator ) deduplicateIdentity (cap * pb.ChaincodeActionPayload ) ([]* common.SignedData , error ) {
623
- // this is the first part of the signed message
624
- prespBytes := cap .Action .ProposalResponsePayload
625
-
626
- // build the signature set for the evaluation
627
- signatureSet := []* common.SignedData {}
628
- signatureMap := make (map [string ]struct {})
629
- // loop through each of the endorsements and build the signature set
630
- for _ , endorsement := range cap .Action .Endorsements {
631
- //unmarshal endorser bytes
632
- serializedIdentity := & msp.SerializedIdentity {}
633
- if err := proto .Unmarshal (endorsement .Endorser , serializedIdentity ); err != nil {
634
- logger .Errorf ("Unmarshal endorser error: %s" , err )
635
- return nil , policyErr (fmt .Errorf ("Unmarshal endorser error: %s" , err ))
636
- }
637
- identity := serializedIdentity .Mspid + string (serializedIdentity .IdBytes )
638
- if _ , ok := signatureMap [identity ]; ok {
639
- // Endorsement with the same identity has already been added
640
- logger .Warningf ("Ignoring duplicated identity, Mspid: %s, pem:\n %s" , serializedIdentity .Mspid , serializedIdentity .IdBytes )
641
- continue
642
- }
643
- signatureSet = append (signatureSet , & common.SignedData {
644
- // set the data that is signed; concatenation of proposal response bytes and endorser ID
645
- Data : append (prespBytes , endorsement .Endorser ... ),
646
- // set the identity that signs the message: it's the endorser
647
- Identity : endorsement .Endorser ,
648
- // set the signature
649
- Signature : endorsement .Signature })
650
- signatureMap [identity ] = struct {}{}
651
- }
652
-
653
- logger .Debugf ("Signature set is of size %d out of %d endorsement(s)" , len (signatureSet ), len (cap .Action .Endorsements ))
654
- return signatureSet , nil
655
- }
656
-
657
621
type state struct {
658
622
State
659
623
}
0 commit comments