Skip to content

Commit

Permalink
Update common.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ggq89 committed Aug 30, 2019
1 parent 77a98fa commit 5ccdbf8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions contracts/syscontract/deposit/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,12 @@ func addCandaditeList(stub shim.ChaincodeStubInterface, invokeAddr common.Addres
if list == nil {
list = make(map[string]bool)
}
if list[invokeAddr.String()] {
return fmt.Errorf("node was in the list")
}

// 重复操作一次又何妨
//if list[invokeAddr.String()] {
// return fmt.Errorf("node was in the list")
//}

list[invokeAddr.String()] = true
listByte, err := json.Marshal(list)
if err != nil {
Expand Down

0 comments on commit 5ccdbf8

Please sign in to comment.