@@ -106,17 +106,15 @@ public void getTransactionApprovedList_01() {
106
106
permissionKeyString [0 ] = dev001Key ;
107
107
permissionKeyString [1 ] = sendAccountKey2 ;
108
108
109
- String accountPermissionJson1 =
110
- "{\" owner_permission\" :{\" type\" :0,\" permission_name\" "
111
- + ":\" owner\" ,\" threshold\" :1,\" keys\" :[{\" address\" "
112
- + ":\" " + PublicMethed .getAddressString (dev001Key ) + "\" ,\" weight\" :1}]},"
113
- + "\" active_permissions\" :[{\" type\" :2,\" permission_name\" :"
114
- + "\" active0\" ,\" threshold\" :1,\" operations\" "
115
- + ":\" 0200000000000000000000000000000000000000000000000000000000000000\" ,"
116
- + "\" keys\" :[{\" address\" :\" " + PublicMethed .getAddressString (sendAccountKey2 )
117
- + "\" ,\" weight\" :1},"
118
- + "{\" address\" :\" " + PublicMethed .getAddressString (sendAccountKey3 )
119
- + "\" ,\" weight\" :1}]}]} " ;
109
+ String accountPermissionJson1 = "{\" owner_permission\" :{\" type\" :0,\" permission_name\" :"
110
+ + "\" owner\" ,\" threshold\" :2,\" keys\" :[{\" address\" :"
111
+ + "\" " + PublicMethed .getAddressString (dev001Key ) + "\" ,\" weight\" :1},"
112
+ + "{\" address\" :\" " + PublicMethed .getAddressString (sendAccountKey2 ) + "\" ,\" weight\" :1}]},"
113
+ + "\" active_permissions\" :[{\" type\" :2,\" permission_name\" :\" active0\" ,"
114
+ + "\" threshold\" :1,\" operations\" :"
115
+ + "\" 0200000000000000000000000000000000000000000000000000000000000000\" ,"
116
+ + "\" keys\" :[{\" address\" :\" " + PublicMethed .getAddressString (sendAccountKey3 )
117
+ + "\" ,\" weight\" :1}]}]} " ;
120
118
121
119
Transaction transaction = PublicMethedForMutiSign
122
120
.accountPermissionUpdateWithoutSign (accountPermissionJson1 , test001Address , dev001Key ,
@@ -125,15 +123,19 @@ public void getTransactionApprovedList_01() {
125
123
126
124
Transaction transaction1 = PublicMethedForMutiSign
127
125
.addTransactionSignWithPermissionId (transaction , dev001Key , 0 , blockingStubFull );
126
+ Transaction transaction2 = PublicMethed
127
+ .addTransactionSign (transaction1 , sendAccountKey2 , blockingStubFull );
128
128
TransactionApprovedList transactionApprovedList = PublicMethed
129
- .getTransactionApprovedList (transaction1 , blockingStubFull );
129
+ .getTransactionApprovedList (transaction2 , blockingStubFull );
130
130
logger .info ("test001Address:" + Base58 .encode58Check (test001Address ));
131
131
logger .info (
132
132
"transactionApprovedList:" + Base58
133
133
.encode58Check (transactionApprovedList .getApprovedList (0 ).toByteArray ()));
134
134
Assert .assertEquals (Base58 .encode58Check (test001Address ), Base58
135
135
.encode58Check (transactionApprovedList .getApprovedList (0 ).toByteArray ()));
136
- Assert .assertEquals (1 , transactionApprovedList .getApprovedListCount ());
136
+ Assert .assertEquals (Base58 .encode58Check (test002Address ), Base58
137
+ .encode58Check (transactionApprovedList .getApprovedList (1 ).toByteArray ()));
138
+ Assert .assertEquals (2 , transactionApprovedList .getApprovedListCount ());
137
139
Assert .assertEquals (0 ,
138
140
transactionApprovedList .getTransaction ().getTransaction ().getRawData ().getContract (0 )
139
141
.getPermissionId ());
@@ -200,14 +202,11 @@ public void getTransactionApprovedList_02() {
200
202
logger .info (PublicMethedForMutiSign .printPermission (witnessPermission1 ));
201
203
202
204
Transaction transaction = PublicMethedForMutiSign
203
- .sendcoinWithPermissionIdNotSign (test005Address , 1L , test001Address , 2 , dev001Key ,
205
+ .sendcoinWithPermissionIdNotSign (fromAddress , 1L , test001Address , 2 , dev001Key ,
204
206
blockingStubFull );
205
207
Transaction transaction1 = PublicMethedForMutiSign
206
208
.addTransactionSignWithPermissionId (transaction , sendAccountKey2 , 2 , blockingStubFull );
207
- TransactionApprovedList transactionApprovedList = PublicMethed
208
- .getTransactionApprovedList (transaction1 , blockingStubFull );
209
209
210
- logger .info ("transactionSignWeight:" + transactionApprovedList );
211
210
String accountPermissionJson2 =
212
211
"{\" owner_permission\" :{\" type\" :0,\" permission_name\" "
213
212
+ ":\" owner\" ,\" threshold\" :1,\" keys\" :[{\" address\" "
@@ -223,6 +222,10 @@ public void getTransactionApprovedList_02() {
223
222
.accountPermissionUpdateWithPermissionId (accountPermissionJson2 , test001Address , dev001Key ,
224
223
blockingStubFull , 0 ,
225
224
permissionKeyString ));
225
+ TransactionApprovedList transactionApprovedList = PublicMethed
226
+ .getTransactionApprovedList (transaction1 , blockingStubFull );
227
+
228
+ logger .info ("transactionSignWeight:" + transactionApprovedList );
226
229
logger .info ("transactionSignWeight:" + transactionApprovedList );
227
230
logger .info ("test001Address:" + Base58 .encode58Check (test001Address ));
228
231
logger .info (
@@ -616,7 +619,11 @@ public void getTransactionApprovedList_07() {
616
619
logger .info ("transactionSignWeight:" + transactionApprovedList );
617
620
618
621
Assert .assertEquals (1 , transactionApprovedList .getApprovedListCount ());
619
-
622
+ Assert .assertEquals (Base58 .encode58Check (test002Address ), Base58
623
+ .encode58Check (transactionApprovedList .getApprovedList (0 ).toByteArray ()));
624
+ Assert .assertEquals (0 ,
625
+ transactionApprovedList .getTransaction ().getTransaction ().getRawData ().getContract (0 )
626
+ .getPermissionId ());
620
627
Account test001AddressAccount2 = PublicMethed .queryAccount (test001Address , blockingStubFull );
621
628
List <Permission > permissionsList2 = test001AddressAccount2 .getActivePermissionList ();
622
629
Permission ownerPermission2 = test001AddressAccount2 .getOwnerPermission ();
0 commit comments