Skip to content

Commit a6a5e87

Browse files
committed
fix #33
issue arising from mainnet-tx:6dd08f9cec8fe67ecea970e1ac0c4963950a0900628fccfb29493be02efaf828 non-standard tx with a zero amount utxo
1 parent 1f1d332 commit a6a5e87

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/common/types/utxo.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ func FindBiggestRemainingUTXO(utxoSpent UTXO, utxos []UTXO) (*uint64, error) {
158158
}
159159

160160
if spentIsMax {
161-
if valueMax == 0 {
162-
common.ErrorLogger.Printf("%+v", utxoSpent)
163-
common.ErrorLogger.Printf("%+v", utxos)
164-
return nil, errors.New("valueMax was 0. this should not happen")
165-
}
161+
// if valueMax == 0 {
162+
// common.ErrorLogger.Printf("%+v", utxoSpent)
163+
// common.ErrorLogger.Printf("%+v", utxos)
164+
// return nil, errors.New("valueMax was 0. this should not happen")
165+
// }
166166
// If the spent UTXO was the largest, return the max value among the remaining UTXOs.
167167
return &valueMax, nil
168168
} else {

0 commit comments

Comments
 (0)