From 24a5645fce2a08186cb9eef40c23f7015fa97366 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Fri, 25 Oct 2013 10:53:40 -0500 Subject: [PATCH] Update for recent btcchain tx script val change. The ValidateTransactionScripts was recently changed to accept script flags which pass through to the script engine in order to control its validation behavior. This commit modifies the transaction memory pool script validation code for this change and additionally adds the new flag to perform canonical signtaure checking. --- mempool.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mempool.go b/mempool.go index b79bd92f..c017ae7a 100644 --- a/mempool.go +++ b/mempool.go @@ -706,7 +706,8 @@ func (mp *txMemPool) maybeAcceptTransaction(tx *btcwire.MsgTx, isOrphan *bool) e // Verify crypto signatures for each input and reject the transaction if // any don't verify. - err = btcchain.ValidateTransactionScripts(tx, &txHash, time.Now(), txStore) + flags := btcscript.ScriptBip16 | btcscript.ScriptCanonicalSignatures + err = btcchain.ValidateTransactionScripts(tx, &txHash, txStore, flags) if err != nil { return err }