Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/org/tron/core/db/BandwidthProcessor.java
Original file line number Diff line number Diff line change
@@ -18,7 +18,10 @@
import org.tron.core.exception.TooBigTransactionResultException;
import org.tron.protos.Contract.TransferAssetContract;
import org.tron.protos.Contract.TransferContract;
import org.tron.protos.Protocol.Transaction;
import org.tron.protos.Protocol.Transaction.Contract;
import org.tron.protos.Protocol.Transaction.Result;
import org.tron.protos.Protocol.Transaction.Result.contractResult;

@Slf4j
public class BandwidthProcessor extends ResourceProcessor {
@@ -60,10 +63,7 @@ public void consume(TransactionCapsule trx, TransactionResultCapsule ret,

long bytesSize;
if (dbManager.getDynamicPropertiesStore().supportVM()) {
TransactionCapsule txCapForEstimateBandWidth = new TransactionCapsule(
trx.getInstance().getRawData(),
trx.getInstance().getSignatureList());
bytesSize = txCapForEstimateBandWidth.getSerializedSize();
bytesSize = trx.getInstance().toBuilder().clearRet().build().getSerializedSize();
} else {
bytesSize = trx.getSerializedSize();
}

0 comments on commit da9a8ac

Please sign in to comment.