aboutsummaryrefslogtreecommitdiff
path: root/src/script/bitcoinconsensus.cpp
diff options
context:
space:
mode:
authorThomas Kerin <thomas.kerin@bitmaintech.com>2018-07-13 12:47:07 +0100
committerThomas Kerin <thomas.kerin@bitmaintech.com>2018-07-13 22:13:10 +0100
commit417b6c1d2990ffc78c029442e027797d724a101f (patch)
treeb732d11cf1d45d1a0e9efdcd5df78c6568341ec0 /src/script/bitcoinconsensus.cpp
parent2ea7eb62b21affeb56fcea7433cfff9e5bc4742c (diff)
downloadbitcoin-417b6c1d2990ffc78c029442e027797d724a101f.tar.xz
bitcoinconsensus: invalid flags should be set to bitcoinconsensus_error type, add test cases covering bitcoinconsensus error codes
Diffstat (limited to 'src/script/bitcoinconsensus.cpp')
-rw-r--r--src/script/bitcoinconsensus.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp
index 8cc44b675f..e2370c5e50 100644
--- a/src/script/bitcoinconsensus.cpp
+++ b/src/script/bitcoinconsensus.cpp
@@ -81,7 +81,7 @@ static int verify_script(const unsigned char *scriptPubKey, unsigned int scriptP
unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err)
{
if (!verify_flags(flags)) {
- return bitcoinconsensus_ERR_INVALID_FLAGS;
+ return set_error(err, bitcoinconsensus_ERR_INVALID_FLAGS);
}
try {
TxInputStream stream(SER_NETWORK, PROTOCOL_VERSION, txTo, txToLen);