We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ee09d3 commit 84108f3Copy full SHA for 84108f3
1 file changed
src/chain/script.cpp
@@ -471,6 +471,10 @@ const operations& script::ops() const NOEXCEPT
471
// Consensus (witness::extract_script) and Electrum server payments key.
472
hash_digest script::hash() const NOEXCEPT
473
{
474
+ // A failed parse or default initialized script will hash to null_hash.
475
+ if (!is_valid())
476
+ return {};
477
+
478
hash_digest hash{};
479
stream::out::fast stream{ hash };
480
hash::sha256::fast sink(stream);
0 commit comments