Skip to content

Commit

Permalink
Bugfix: Check inputs/outputs correctly and add etx gas to conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
jdowning100 committed Oct 17, 2024
1 parent e203b9c commit 423400f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ func ValidateQiTxOutputsAndSignature(tx *types.Transaction, chain ChainContext,
}
}
// Ensure the transaction does not spend more than its inputs.
if totalQitOut.Cmp(totalQitIn) == 1 {
if totalQitOut.Cmp(totalQitIn) > 1 {
str := fmt.Sprintf("total value of all transaction inputs for "+
"transaction %v is %v which is less than the amount "+
"spent of %v", tx.Hash(), totalQitIn, totalQitOut)
Expand Down Expand Up @@ -1348,7 +1348,7 @@ func ProcessQiTx(tx *types.Transaction, chain ChainContext, checkSig bool, isFir
// Start timing for fee verification
stepStart = time.Now()
// Ensure the transaction does not spend more than its inputs.
if totalQitOut.Cmp(totalQitIn) == 1 {
if totalQitOut.Cmp(totalQitIn) > 1 {
str := fmt.Sprintf("total value of all transaction inputs for "+
"transaction %v is %v which is less than the amount "+
"spent of %v", tx.Hash(), totalQitIn, totalQitOut)
Expand Down

0 comments on commit 423400f

Please sign in to comment.