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

Method ScriptSize

src/script/descriptor.cpp:1387–1390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1385 bool IsSingleType() const final { return true; }
1386
1387 std::optional<int64_t> ScriptSize() const override {
1388 const auto n_keys = m_pubkey_args.size();
1389 return (1 + 32 + 1) * n_keys + BuildScript(m_threshold).size() + 1;
1390 }
1391
1392 std::optional<int64_t> MaxSatSize(bool use_max_sig) const override {
1393 return (1 + 65) * m_threshold + (m_pubkey_args.size() - m_threshold);

Callers

nothing calls this directly

Calls 2

BuildScriptFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected