Skip to content

Commit 499316b

Browse files
committed
cleanup fix
Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
1 parent 662e58e commit 499316b

4 files changed

Lines changed: 5 additions & 10 deletions

File tree

token/core/fabtoken/v1/audit/auditor.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,3 @@ func TransferAuditValidate(precision uint64) ValidateTransferAuditFunc {
150150
return nil
151151
}
152152
}
153-

token/core/zkatdlog/nogh/v1/audit/auditor.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,4 +611,3 @@ func commit(vector []*math.Zr, generators []*math.G1, c *math.Curve) *math.G1 {
611611

612612
return com
613613
}
614-

token/core/zkatdlog/nogh/v1/testutils/env.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"context"
1111
"encoding/base64"
1212
"encoding/json"
13+
"maps"
1314
"os"
1415
"strconv"
1516

@@ -560,12 +561,8 @@ func prepareSwapRequest(benchCase *benchmark2.Case, pp *v1setup.PublicParams, au
560561
}
561562

562563
auditTokens := make(map[string]*token2.Token)
563-
for tokenID, token := range inputsForTransfer1 {
564-
auditTokens[tokenID] = token
565-
}
566-
for tokenID, token := range inputsForTransfer2 {
567-
auditTokens[tokenID] = token
568-
}
564+
maps.Copy(auditTokens, inputsForTransfer1)
565+
maps.Copy(auditTokens, inputsForTransfer2)
569566

570567
err = auditor.Check(context.Background(), ar, metadata, "2", auditTokens)
571568
if err != nil {

token/core/zkatdlog/nogh/v1/testutils/env_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ func TestSaveTransferToFile(t *testing.T) {
8989
},
9090
Application: nil,
9191
}
92-
inputs := map[*token.ID]*token.Token{
93-
{TxId: "a_transaction_id", Index: 1}: {
92+
inputs := map[string]*token.Token{
93+
token.ID{TxId: "a_transaction_id", Index: 1}.String(): {
9494
Owner: []byte("an_owner"),
9595
Type: "a_type",
9696
Quantity: "a_quantity",

0 commit comments

Comments
 (0)