From 8945620a8494f69764777638c314291a02b9ecfa Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Tue, 6 Jan 2015 19:20:25 -0500 Subject: [PATCH] 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. --- validate.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/validate.go b/validate.go index 04cb1787c..af9f52e03 100644 --- a/validate.go +++ b/validate.go @@ -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) }