Skip to content

Commit 84ffb78

Browse files
committed
up
1 parent 3113bbf commit 84ffb78

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/org/tron/core/services/WhitelistService.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@
99
import org.apache.commons.collections4.MapUtils;
1010
import org.springframework.stereotype.Component;
1111
import org.tron.common.utils.ByteArray;
12+
import org.tron.common.utils.ForkController;
1213
import org.tron.core.Wallet;
1314
import org.tron.core.capsule.TransactionCapsule;
15+
import org.tron.core.config.Parameter.ForkBlockVersionEnum;
1416
import org.tron.core.config.args.Args;
1517
import org.tron.core.db.common.WrappedByteArray;
1618
import org.tron.core.exception.WhitelistException;
1719
import org.tron.protos.Protocol.Transaction.Contract;
1820
import org.tron.protos.Protocol.Transaction.Contract.ContractType;
1921

22+
// TODO
2023
@Component
2124
@Slf4j
2225
public class WhitelistService {
@@ -41,6 +44,10 @@ public void loadFromConfig() {
4144
}
4245

4346
public static void check(TransactionCapsule transactionCapsule) throws WhitelistException {
47+
if (!ForkController.instance().pass(ForkBlockVersionEnum.VERSION_3_5)) {
48+
return;
49+
}
50+
4451
if (MapUtils.isEmpty(whitelist)) {
4552
return;
4653
}

0 commit comments

Comments
 (0)