Improve double spend error strings.
The error message now includes both the previous tx hash and output index, rather than simply the transaction with the already spent output.
This commit is contained in:
parent
6af9302374
commit
8945620a84
1 changed files with 1 additions and 2 deletions
|
@ -701,8 +701,7 @@ func CheckTransactionInputs(tx *btcutil.Tx, txHeight int64, txStore TxStore) (in
|
|||
}
|
||||
if originTx.Spent[originTxIndex] {
|
||||
str := fmt.Sprintf("transaction %v tried to double "+
|
||||
"spend coins from transaction %v", txHash,
|
||||
txInHash)
|
||||
"spend output %v", txHash, txIn.PreviousOutPoint)
|
||||
return 0, ruleError(ErrDoubleSpend, str)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue