MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / CalcScriptLen

Method CalcScriptLen

src/script/miniscript.h:618–626  ·  view source on GitHub ↗

Compute the length of the script for this miniscript (including children).

Source from the content-addressed store, hash-verified

616
617 //! Compute the length of the script for this miniscript (including children).
618 size_t CalcScriptLen() const
619 {
620 size_t subsize = 0;
621 for (const auto& sub : subs) {
622 subsize += sub.ScriptSize();
623 }
624 Type sub0type = subs.size() > 0 ? subs[0].GetType() : ""_mst;
625 return internal::ComputeScriptLen(fragment, sub0type, subsize, k, subs.size(), keys.size(), m_script_ctx);
626 }
627
628 /* Apply a recursive algorithm to a Miniscript tree, without actual recursive calls.
629 *

Callers

nothing calls this directly

Calls 4

ComputeScriptLenFunction · 0.85
ScriptSizeMethod · 0.45
sizeMethod · 0.45
GetTypeMethod · 0.45

Tested by

no test coverage detected