Skip to content
This repository was archived by the owner on Sep 6, 2022. It is now read-only.

Commit fea3b10

Browse files
author
Inal Djafar
authored
do not update status if testtuple status is the same (#108)
1 parent b1a6d28 commit fea3b10

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

chaincode/testtuple.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,10 @@ func (testtuple *Testtuple) validateNewStatus(db *LedgerDB, status string) error
432432

433433
// commitStatusUpdate update the testtuple status in the ledger
434434
func (testtuple *Testtuple) commitStatusUpdate(db *LedgerDB, testtupleKey string, newStatus string) error {
435+
if testtuple.Status == newStatus {
436+
return nil
437+
}
438+
435439
if err := testtuple.validateNewStatus(db, newStatus); err != nil {
436440
return errors.Internal("update testtuple %s failed: %s", testtupleKey, err.Error())
437441
}

0 commit comments

Comments
 (0)