16 | | - | func verify () = { |
---|
17 | | - | let firstUserSigned = if (if (if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser)) |
---|
18 | | - | then true |
---|
19 | | - | else sigVerify(tx.bodyBytes, tx.proofs[1], firstUser)) |
---|
20 | | - | then true |
---|
21 | | - | else sigVerify(tx.bodyBytes, tx.proofs[2], firstUser)) |
---|
22 | | - | then true |
---|
23 | | - | else sigVerify(tx.bodyBytes, tx.proofs[3], firstUser)) |
---|
24 | | - | then true |
---|
25 | | - | else sigVerify(tx.bodyBytes, tx.proofs[4], firstUser)) |
---|
26 | | - | then 1 |
---|
27 | | - | else 0 |
---|
28 | | - | let secondUserSigned = if (if (if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser)) |
---|
29 | | - | then true |
---|
30 | | - | else sigVerify(tx.bodyBytes, tx.proofs[1], secondUser)) |
---|
31 | | - | then true |
---|
32 | | - | else sigVerify(tx.bodyBytes, tx.proofs[2], secondUser)) |
---|
33 | | - | then true |
---|
34 | | - | else sigVerify(tx.bodyBytes, tx.proofs[3], secondUser)) |
---|
35 | | - | then true |
---|
36 | | - | else sigVerify(tx.bodyBytes, tx.proofs[4], secondUser)) |
---|
37 | | - | then 1 |
---|
38 | | - | else 0 |
---|
39 | | - | let thirdUserSigned = if (if (if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser)) |
---|
40 | | - | then true |
---|
41 | | - | else sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser)) |
---|
42 | | - | then true |
---|
43 | | - | else sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser)) |
---|
44 | | - | then true |
---|
45 | | - | else sigVerify(tx.bodyBytes, tx.proofs[3], thirdUser)) |
---|
46 | | - | then true |
---|
47 | | - | else sigVerify(tx.bodyBytes, tx.proofs[4], thirdUser)) |
---|
48 | | - | then 1 |
---|
49 | | - | else 0 |
---|
50 | | - | let fourthUserSigned = if (if (if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], fourthUser)) |
---|
51 | | - | then true |
---|
52 | | - | else sigVerify(tx.bodyBytes, tx.proofs[1], fourthUser)) |
---|
53 | | - | then true |
---|
54 | | - | else sigVerify(tx.bodyBytes, tx.proofs[2], fourthUser)) |
---|
55 | | - | then true |
---|
56 | | - | else sigVerify(tx.bodyBytes, tx.proofs[3], fourthUser)) |
---|
57 | | - | then true |
---|
58 | | - | else sigVerify(tx.bodyBytes, tx.proofs[4], fourthUser)) |
---|
59 | | - | then 1 |
---|
60 | | - | else 0 |
---|
61 | | - | let fifthUserSigned = if (if (if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], fifthUser)) |
---|
62 | | - | then true |
---|
63 | | - | else sigVerify(tx.bodyBytes, tx.proofs[1], fifthUser)) |
---|
64 | | - | then true |
---|
65 | | - | else sigVerify(tx.bodyBytes, tx.proofs[2], fifthUser)) |
---|
66 | | - | then true |
---|
67 | | - | else sigVerify(tx.bodyBytes, tx.proofs[3], fifthUser)) |
---|
68 | | - | then true |
---|
69 | | - | else sigVerify(tx.bodyBytes, tx.proofs[4], fifthUser)) |
---|
70 | | - | then 1 |
---|
71 | | - | else 0 |
---|
72 | | - | match tx { |
---|
73 | | - | case d: SetScriptTransaction|IssueTransaction|CreateAliasTransaction|IssueTransaction|DataTransaction => |
---|
74 | | - | sigVerify(tx.bodyBytes, tx.proofs[0], secondUser) |
---|
75 | | - | case d: TransferTransaction => |
---|
76 | | - | (((((firstUserSigned + secondUserSigned) + thirdUserSigned) + fourthUserSigned) + fifthUserSigned) >= 4) |
---|
77 | | - | case _ => |
---|
78 | | - | false |
---|
79 | | - | } |
---|
80 | | - | } |
---|
| 8 | + | func verify () = match tx { |
---|
| 9 | + | case _ => |
---|
| 10 | + | true |
---|
| 11 | + | } |
---|