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 {
905
905
public BlockCapsule getBlockByNum (final long num ) throws ItemNotFoundException , BadItemException {
906
906
return getBlockById (getBlockIdByNum (num ));
907
907
}
908
+
908
909
/**
909
910
* Generate a block.
910
911
*/
@@ -933,13 +934,14 @@ public synchronized BlockCapsule generateBlock(
933
934
Iterator iterator = pendingTransactions .iterator ();
934
935
while (iterator .hasNext ()) {
935
936
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 ) {
937
939
logger .debug ("Processing transaction time exceeds the 50% producing time。" );
938
940
break ;
939
941
}
940
942
currentTrxSize += trx .getSerializedSize () + 2 ;
941
943
// check the block size
942
- if (currentTrxSize > ChainConstant .BLOCK_SIZE ) {
944
+ if (currentTrxSize > ChainConstant .BLOCK_SIZE ) {
943
945
postponedTrxCount ++;
944
946
continue ;
945
947
}
You can’t perform that action at this time.
0 commit comments