File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/java/org/tron/core/db Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -905,6 +905,7 @@ public BlockId getBlockIdByNum(final long num) throws ItemNotFoundException {
905905 public BlockCapsule getBlockByNum (final long num ) throws ItemNotFoundException , BadItemException {
906906 return getBlockById (getBlockIdByNum (num ));
907907 }
908+
908909 /**
909910 * Generate a block.
910911 */
@@ -933,13 +934,14 @@ public synchronized BlockCapsule generateBlock(
933934 Iterator iterator = pendingTransactions .iterator ();
934935 while (iterator .hasNext ()) {
935936 TransactionCapsule trx = (TransactionCapsule ) iterator .next ();
936- if (DateTime .now ().getMillis () - when > ChainConstant .BLOCK_PRODUCED_INTERVAL * 0.5 ) {
937+ if (DateTime .now ().getMillis () - when
938+ > ChainConstant .BLOCK_PRODUCED_INTERVAL * 0.5 * ChainConstant .BLOCK_PRODUCED_TIME_OUT ) {
937939 logger .debug ("Processing transaction time exceeds the 50% producing time。" );
938940 break ;
939941 }
940942 currentTrxSize += trx .getSerializedSize () + 2 ;
941943 // check the block size
942- if (currentTrxSize > ChainConstant .BLOCK_SIZE ) {
944+ if (currentTrxSize > ChainConstant .BLOCK_SIZE ) {
943945 postponedTrxCount ++;
944946 continue ;
945947 }
You can’t perform that action at this time.
0 commit comments