15
15
16
16
import com .fasterxml .jackson .core .JsonProcessingException ;
17
17
import com .fasterxml .jackson .databind .ObjectMapper ;
18
+
18
19
import java .math .BigInteger ;
19
20
import java .util .Arrays ;
20
21
import java .util .Collections ;
21
22
import java .util .List ;
22
23
import java .util .Objects ;
23
24
import java .util .concurrent .CompletableFuture ;
24
25
import java .util .concurrent .ExecutionException ;
26
+
25
27
import org .fisco .bcos .sdk .jni .BcosSDKJniObj ;
26
28
import org .fisco .bcos .sdk .jni .rpc .RpcJniObj ;
27
29
import org .fisco .bcos .sdk .v3 .client .exceptions .ClientException ;
53
55
import org .fisco .bcos .sdk .v3 .client .protocol .response .SystemConfig ;
54
56
import org .fisco .bcos .sdk .v3 .client .protocol .response .TotalTransactionCount ;
55
57
import org .fisco .bcos .sdk .v3 .config .ConfigOption ;
58
+ import org .fisco .bcos .sdk .v3 .contract .precompiled .sysconfig .SystemConfigService ;
56
59
import org .fisco .bcos .sdk .v3 .crypto .CryptoSuite ;
57
60
import org .fisco .bcos .sdk .v3 .model .CryptoType ;
58
61
import org .fisco .bcos .sdk .v3 .model .EnumNodeVersion ;
@@ -75,6 +78,7 @@ public class ClientImpl implements Client {
75
78
private String chainID ;
76
79
private Boolean wasm ;
77
80
private Boolean authCheck = false ;
81
+ private Boolean enableCommittee = false ;
78
82
private boolean serialExecute ;
79
83
private Boolean smCrypto ;
80
84
private String extraData = "" ;
@@ -121,11 +125,21 @@ protected void initGroupInfo() {
121
125
this .serialExecute = groupNodeIniConfig .getExecutor ().isSerialExecute ();
122
126
123
127
this .authCheck = groupNodeIniConfig .getExecutor ().isAuthCheck ();
128
+ this .enableCommittee = groupNodeIniConfig .getExecutor ().isAuthCheck ();
124
129
if (EnumNodeVersion .valueOf ((int ) compatibilityVersion )
125
- .toVersionObj ()
126
- .compareTo (EnumNodeVersion .BCOS_3_3_0 .toVersionObj ())
130
+ .toVersionObj ()
131
+ .compareTo (EnumNodeVersion .BCOS_3_3_0 .toVersionObj ())
127
132
>= 0 ) {
128
- this .authCheck = true ;
133
+ this .enableCommittee = true ;
134
+ try {
135
+ SystemConfig systemConfig = getSystemConfigByKey (SystemConfigService .AUTH_STATUS );
136
+ int value = Integer .parseInt (systemConfig .getSystemConfig ().getValue ());
137
+ if (value != 0 ) {
138
+ this .authCheck = true ;
139
+ }
140
+ } catch (Exception ignored ) {
141
+ this .authCheck = false ;
142
+ }
129
143
}
130
144
this .smCrypto = groupNodeIniConfig .getChain ().isSmCrypto ();
131
145
this .blockNumber = this .getBlockNumber ().getBlockNumber ().longValue ();
@@ -230,6 +244,11 @@ public Boolean isAuthCheck() {
230
244
return this .authCheck ;
231
245
}
232
246
247
+ @ Override
248
+ public Boolean isEnableCommittee () {
249
+ return this .enableCommittee ;
250
+ }
251
+
233
252
@ Override
234
253
public Boolean isSerialExecute () {
235
254
return this .serialExecute ;
0 commit comments