Skip to content

Commit 88a5bb5

Browse files
committed
remove trxs pending size limit
1 parent 97d75f5 commit 88a5bb5

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

src/main/java/org/tron/core/config/Parameter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ interface NetConstants {
4545
long HEAD_NUM_MAX_DELTA = 1000L;
4646
long HEAD_NUM_CHECK_TIME = 60000L;
4747
int MAX_INVENTORY_SIZE_IN_MINUTES = 2;
48-
long NET_MAX_TRX_PER_SECOND = 1000L;
48+
long NET_MAX_TRX_PER_SECOND = 700L;
4949
long MAX_TRX_PER_PEER = 200L;
5050
int NET_MAX_INV_SIZE_IN_MINUTES = 2;
5151
int MSG_CACHE_DURATION_IN_BLOCKS = 5;

src/main/java/org/tron/core/db/Manager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ public synchronized BlockCapsule generateBlock(
934934
TransactionCapsule trx = (TransactionCapsule) iterator.next();
935935
if (DateTime.now().getMillis() - when
936936
> ChainConstant.BLOCK_PRODUCED_INTERVAL * 0.5 * ChainConstant.BLOCK_PRODUCED_TIME_OUT) {
937-
logger.debug("Processing transaction time exceeds the 50% producing time。");
937+
logger.warn("Processing transaction time exceeds the 50% producing time。");
938938
break;
939939
}
940940
// check the block size

src/main/java/org/tron/core/net/node/NodeDelegateImpl.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import static org.tron.core.config.Parameter.ChainConstant.BLOCK_PRODUCED_INTERVAL;
44
import static org.tron.core.config.Parameter.ChainConstant.BLOCK_SIZE;
5-
import static org.tron.core.config.Parameter.NodeConstant.MAX_TRANSACTION_PENDING;
65

76
import com.google.common.primitives.Longs;
87
import java.util.ArrayList;
@@ -104,10 +103,6 @@ public synchronized LinkedList<Sha256Hash> handleBlock(BlockCapsule block, boole
104103
@Override
105104
public void handleTransaction(TransactionCapsule trx) throws BadTransactionException {
106105
logger.info("handle transaction");
107-
if (dbManager.getPendingTransactions().size() > MAX_TRANSACTION_PENDING * 2) {
108-
logger.warn("The pending txs list is full");
109-
return;
110-
}
111106

112107
if (dbManager.getTransactionIdCache().getIfPresent(trx.getTransactionId()) != null) {
113108
logger.warn("This transaction has been processed");

0 commit comments

Comments
 (0)