Skip to content

Commit

Permalink
Remove dummy qiTxValue to make it obvious they are equal
Browse files Browse the repository at this point in the history
  • Loading branch information
Djadih committed Dec 18, 2024
1 parent 73ab4e9 commit 70de7e6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions core/state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,6 @@ func ProcessQiTx(tx *types.Transaction, chain ChainContext, checkSig bool, isFir
var elapsedTime time.Duration
stepTimings := make(map[string]time.Duration)

qiTxFee := big.NewInt(0)
// Start timing for sanity checks
stepStart := time.Now()
// Sanity checks
Expand Down Expand Up @@ -1382,7 +1381,6 @@ func ProcessQiTx(tx *types.Transaction, chain ChainContext, checkSig bool, isFir

// the fee to pay the basefee/miner is the difference between inputs and outputs
txFeeInQit := new(big.Int).Sub(totalQitIn, totalQitOut)
qiTxFee = new(big.Int).Set(txFeeInQit)
// Check tx against required base fee and gas
requiredGas := intrinsicGas + (uint64(len(etxs)) * (params.TxGas + params.ETXGas)) // Each ETX costs extra gas that is paid in the origin
if requiredGas < intrinsicGas {
Expand Down Expand Up @@ -1457,7 +1455,7 @@ func ProcessQiTx(tx *types.Transaction, chain ChainContext, checkSig bool, isFir
elapsedTime = time.Since(stepStart)
stepTimings["Signature Check"] = elapsedTime

return qiTxFee, txFeeInQit, etxs, nil, stepTimings
return txFeeInQit, txFeeInQit, etxs, nil, stepTimings
}

// Go through all denominations largest to smallest, check if the input exists as the output, if not, convert it to the respective number of bills for the next smallest denomination, then repeat the check. Subtract the 'carry' when the outputs match the carry for that denomination.
Expand Down

0 comments on commit 70de7e6

Please sign in to comment.