From b7ef1f0946d3e41b4cb1880a3f06568152376d7e Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Mon, 3 Feb 2014 20:03:06 -0600 Subject: [PATCH] Include transaction hash in failed input val error. --- scriptval.go | 3 ++- validate.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scriptval.go b/scriptval.go index 3e0e7598..4efdd274 100644 --- a/scriptval.go +++ b/scriptval.go @@ -90,7 +90,8 @@ out: // Execute the script pair. if err := engine.Execute(); err != nil { err := fmt.Errorf("validate of input "+ - "%d failed: %v", txVI.txInIndex, err) + "%d from transaction %s failed: %v", + txVI.txInIndex, txInHash, err) v.sendResult(err) break out } diff --git a/validate.go b/validate.go index ecee9208..28555404 100644 --- a/validate.go +++ b/validate.go @@ -747,7 +747,7 @@ func (b *BlockChain) checkConnectBlock(node *blockNode, block *btcutil.Block) er // BIP0016 describes a pay-to-script-hash type that is considered a // "standard" type. The rules for this BIP only apply to transactions - // after the timestmap defined by btcscript.Bip16Activation. See + // after the timestamp defined by btcscript.Bip16Activation. See // https://en.bitcoin.it/wiki/BIP_0016 for more details. enforceBIP0016 := false if node.timestamp.After(btcscript.Bip16Activation) {