Skip to content

Commit 4c2977d

Browse files
committed
reset cacl bytesSize.
1 parent ea6dde7 commit 4c2977d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
import org.tron.core.exception.TooBigTransactionResultException;
1919
import org.tron.protos.Contract.TransferAssetContract;
2020
import org.tron.protos.Contract.TransferContract;
21+
import org.tron.protos.Protocol.Transaction;
2122
import org.tron.protos.Protocol.Transaction.Contract;
23+
import org.tron.protos.Protocol.Transaction.Result;
24+
import org.tron.protos.Protocol.Transaction.Result.contractResult;
2225

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

6164
long bytesSize;
6265
if (dbManager.getDynamicPropertiesStore().supportVM()) {
63-
TransactionCapsule txCapForEstimateBandWidth = new TransactionCapsule(
64-
trx.getInstance().getRawData(),
65-
trx.getInstance().getSignatureList());
66-
bytesSize = txCapForEstimateBandWidth.getSerializedSize();
66+
bytesSize = trx.getInstance().toBuilder().clearRet().build().getSerializedSize();
6767
} else {
6868
bytesSize = trx.getSerializedSize();
6969
}

0 commit comments

Comments
 (0)