You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #13655: bitcoinconsensus: invalid flags error should be set to bitcoinconsensus_err
417b6c1 bitcoinconsensus: invalid flags should be set to bitcoinconsensus_error type, add test cases covering bitcoinconsensus error codes (Thomas Kerin)
Pull request description:
A check was added to the bitcoinconsensus verify_script codepath to ensure that callers only used _exposed_ interpreter flags. I think this error should be written to `bitcoinconsensus_err* err` and not returned by verify_script?
I modified the check so it indicates the error using *err like the others, and added tests covering the error codes.
Tree-SHA512: 8ab370e56956a7d4740f83475e6078774affd663ac92383a02b85295da550f1b4f7a7a68f32ed5c5bcb39d98e2f15ec0b76de8399887e7763eb7c1e21d131093
int result = bitcoinconsensus_verify_script(scriptPubKey.data(), scriptPubKey.size(), (constunsignedchar*)&stream[0], stream.size(), nIn, libconsensus_flags, &err);
1520
+
BOOST_CHECK_EQUAL(result, 1);
1521
+
BOOST_CHECK_EQUAL(err, bitcoinconsensus_ERR_OK);
1522
+
}
1523
+
1524
+
/* Test bitcoinconsensus_verify_script returns invalid tx index err*/
int result = bitcoinconsensus_verify_script(scriptPubKey.data(), scriptPubKey.size(), (constunsignedchar*)&stream[0], stream.size(), nIn, libconsensus_flags, &err);
int result = bitcoinconsensus_verify_script(scriptPubKey.data(), scriptPubKey.size(), (constunsignedchar*)&stream[0], stream.size(), nIn, libconsensus_flags, &err);
int result = bitcoinconsensus_verify_script(scriptPubKey.data(), scriptPubKey.size(), (constunsignedchar*)&stream[0], stream.size(), nIn, libconsensus_flags, &err);
int result = bitcoinconsensus_verify_script(scriptPubKey.data(), scriptPubKey.size(), (constunsignedchar*)&stream[0], stream.size(), nIn, libconsensus_flags, &err);
0 commit comments