We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9ee09d3 + 84108f3 commit 3fa06efCopy full SHA for 3fa06ef
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