53
53
import org .fisco .bcos .sdk .v3 .client .protocol .response .SystemConfig ;
54
54
import org .fisco .bcos .sdk .v3 .client .protocol .response .TotalTransactionCount ;
55
55
import org .fisco .bcos .sdk .v3 .config .ConfigOption ;
56
+ import org .fisco .bcos .sdk .v3 .contract .precompiled .sysconfig .SystemConfigService ;
56
57
import org .fisco .bcos .sdk .v3 .crypto .CryptoSuite ;
57
58
import org .fisco .bcos .sdk .v3 .model .CryptoType ;
58
59
import org .fisco .bcos .sdk .v3 .model .EnumNodeVersion ;
@@ -75,6 +76,7 @@ public class ClientImpl implements Client {
75
76
private String chainID ;
76
77
private Boolean wasm ;
77
78
private Boolean authCheck = false ;
79
+ private Boolean enableCommittee = false ;
78
80
private boolean serialExecute ;
79
81
private Boolean smCrypto ;
80
82
private String extraData = "" ;
@@ -121,11 +123,21 @@ protected void initGroupInfo() {
121
123
this .serialExecute = groupNodeIniConfig .getExecutor ().isSerialExecute ();
122
124
123
125
this .authCheck = groupNodeIniConfig .getExecutor ().isAuthCheck ();
126
+ this .enableCommittee = groupNodeIniConfig .getExecutor ().isAuthCheck ();
124
127
if (EnumNodeVersion .valueOf ((int ) compatibilityVersion )
125
128
.toVersionObj ()
126
129
.compareTo (EnumNodeVersion .BCOS_3_3_0 .toVersionObj ())
127
130
>= 0 ) {
128
- this .authCheck = true ;
131
+ this .enableCommittee = true ;
132
+ try {
133
+ SystemConfig systemConfig = getSystemConfigByKey (SystemConfigService .AUTH_STATUS );
134
+ int value = Integer .parseInt (systemConfig .getSystemConfig ().getValue ());
135
+ if (value != 0 ) {
136
+ this .authCheck = true ;
137
+ }
138
+ } catch (Exception ignored ) {
139
+ this .authCheck = false ;
140
+ }
129
141
}
130
142
this .smCrypto = groupNodeIniConfig .getChain ().isSmCrypto ();
131
143
this .blockNumber = this .getBlockNumber ().getBlockNumber ().longValue ();
@@ -230,6 +242,11 @@ public Boolean isAuthCheck() {
230
242
return this .authCheck ;
231
243
}
232
244
245
+ @ Override
246
+ public Boolean isEnableCommittee () {
247
+ return this .enableCommittee ;
248
+ }
249
+
233
250
@ Override
234
251
public Boolean isSerialExecute () {
235
252
return this .serialExecute ;
0 commit comments