File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
src/main/java/org/tron/core Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -360,6 +360,10 @@ public byte[] getData() {
360360 return this .transaction .toByteArray ();
361361 }
362362
363+ public long getSerializedSize () {
364+ return this .transaction .getSerializedSize ();
365+ }
366+
363367 @ Override
364368 public Transaction getInstance () {
365369 return this .transaction ;
Original file line number Diff line number Diff line change @@ -861,7 +861,7 @@ public synchronized BlockCapsule generateBlock(
861861 Iterator iterator = pendingTransactions .iterator ();
862862 while (iterator .hasNext ()) {
863863 TransactionCapsule trx = (TransactionCapsule ) iterator .next ();
864- currentTrxSize += RamUsageEstimator . sizeOf ( trx );
864+ currentTrxSize += trx . getSerializedSize ( );
865865 // judge block size
866866 if (currentTrxSize > ChainConstant .TRXS_SIZE ) {
867867 postponedTrxCount ++;
You can’t perform that action at this time.
0 commit comments