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
committerLuke Dashjr <luke-jr+git@utopios.org>2018-07-29 21:08:45 +0000
commit1cdbea7f742fa128062009ea8ca22383bceacd1e (patch)
treede01ffe2fd6c1700977bbe96ab5c8b98a314e7b4 /src/script/bitcoinconsensus.cpp
parent9d9c4185fadaf243bb97c226e2fef16b65299699 (diff)
bitcoinconsensus: invalid flags should be set to bitcoinconsensus_error type, add test cases covering bitcoinconsensus error codes
Github-Pull: #13655 Rebased-From: 417b6c1d2990ffc78c029442e027797d724a101f
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 7d3587e2c2..752176f73f 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);