aboutsummaryrefslogtreecommitdiff
path: root/src/script/interpreter.h
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2014-10-31 23:29:12 -0400
committerCory Fields <cory-nospam-@coryfields.com>2014-11-14 16:25:53 -0500
commitab9edbd6b6eb3efbca11f16fa467c3c0ef905708 (patch)
treebf904532ea259aedb390ec74e16479db7905c883 /src/script/interpreter.h
parent3d3ce7421e11ed693840e04bee4d18fb9d396309 (diff)
downloadbitcoin-ab9edbd6b6eb3efbca11f16fa467c3c0ef905708.tar.xz
script: create sane error return codes for script validation and remove logging
Attempt to codify the possible error statuses associated with script validation. script/types.h has been created with the expectation that it will be part of the public lib interface. The other flag enums will be moved here in a future commit. Logging has also been removed in order to drop the dependency on core.h. It can be re-added to bitcoind as-needed. This makes script verification finally free of application state and boost!
Diffstat (limited to 'src/script/interpreter.h')
-rw-r--r--src/script/interpreter.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index ed899fc411..14cccc558f 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -6,6 +6,8 @@
#ifndef BITCOIN_SCRIPT_INTERPRETER_H
#define BITCOIN_SCRIPT_INTERPRETER_H
+#include "script_error.h"
+
#include <vector>
#include <stdint.h>
#include <string>
@@ -85,7 +87,7 @@ public:
bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode) const;
};
-bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker);
-bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker);
+bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* error = NULL);
+bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* error = NULL);
#endif // BITCOIN_SCRIPT_INTERPRETER_H