Skip to content

Commit

Permalink
[FABG-982] Remove legacy status codes (#91)
Browse files Browse the repository at this point in the history
Signed-off-by: Troy Ronda <troy@troyronda.com>
  • Loading branch information
troyronda authored Jul 3, 2020
1 parent cef0d99 commit 47216cd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
8 changes: 0 additions & 8 deletions pkg/common/errors/retry/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ var DefaultResMgmtOpts = Opts{
var DefaultRetryableCodes = map[status.Group][]status.Code{
status.EndorserClientStatus: {
status.EndorsementMismatch,
status.PrematureChaincodeExecution,
status.ChaincodeAlreadyLaunching,
status.ChaincodeNameNotFound,
},
status.EndorserServerStatus: {
Expand Down Expand Up @@ -100,8 +98,6 @@ var DefaultRetryableCodes = map[status.Group][]status.Code{
var ResMgmtDefaultRetryableCodes = map[status.Group][]status.Code{
status.EndorserClientStatus: {
status.EndorsementMismatch,
status.PrematureChaincodeExecution,
status.ChaincodeAlreadyLaunching,
status.ChaincodeNameNotFound,
},
status.EndorserServerStatus: {
Expand Down Expand Up @@ -132,9 +128,7 @@ var ResMgmtDefaultRetryableCodes = map[status.Group][]status.Code{
var ChannelClientRetryableCodes = map[status.Group][]status.Code{
status.EndorserClientStatus: {
status.ConnectionFailed, status.EndorsementMismatch,
status.PrematureChaincodeExecution,
status.Code(pb.TxValidationCode_MVCC_READ_CONFLICT),
status.ChaincodeAlreadyLaunching,
status.ChaincodeNameNotFound,
},
status.EndorserServerStatus: {
Expand Down Expand Up @@ -177,8 +171,6 @@ var TestRetryableCodes = map[status.Group][]status.Code{
},
status.EndorserClientStatus: {
status.ConnectionFailed, status.EndorsementMismatch,
status.PrematureChaincodeExecution,
status.ChaincodeAlreadyLaunching,
status.ChaincodeNameNotFound,
status.Code(pb.TxValidationCode_MVCC_READ_CONFLICT),
},
Expand Down
9 changes: 0 additions & 9 deletions pkg/common/errors/status/codes.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,6 @@ const (
// GenericTransient is generally used by tests to indicate that a retry is possible
GenericTransient Code = 12

// PrematureChaincodeExecution indicates that an attempt was made to invoke a chaincode that's
// in the process of being launched.
PrematureChaincodeExecution Code = 21

// ChaincodeAlreadyLaunching indicates that an attempt for multiple simultaneous invokes was made to launch chaincode
ChaincodeAlreadyLaunching Code = 22

// ChaincodeNameNotFound indicates that an that an attempt was made to invoke a chaincode that's not yet initialized
ChaincodeNameNotFound Code = 23
)
Expand All @@ -80,8 +73,6 @@ var CodeName = map[int32]string{
9: "MISSING_ENDORSEMENT",
11: "QUERY_ENDORSERS",
12: "GENERIC_TRANSIENT",
21: "PREMATURE_CHAINCODE_EXECUTION",
22: "CHAINCODE_ALREADY_LAUNCHING",
23: "CHAINCODE_NAME_NOT_FOUND",
}

Expand Down

0 comments on commit 47216cd

Please sign in to comment.