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

Method GetOutputType

src/script/descriptor.cpp:1425–1430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1423 SHDescriptor(std::unique_ptr<DescriptorImpl> desc) : DescriptorImpl({}, std::move(desc), "sh") {}
1424
1425 std::optional<OutputType> GetOutputType() const override
1426 {
1427 assert(m_subdescriptor_args.size() == 1);
1428 if (IsSegwit()) return OutputType::P2SH_SEGWIT;
1429 return OutputType::LEGACY;
1430 }
1431 bool IsSingleType() const final { return true; }
1432
1433 std::optional<int64_t> ScriptSize() const override { return 1 + 1 + 20 + 1; }

Callers 6

IsSegwitMethod · 0.45
DoCheckFunction · 0.45
CheckUnusedFunction · 0.45
TestDescriptorFunction · 0.45
ImportDescriptorsMethod · 0.45
createmultisigFunction · 0.45

Calls 2

IsSegwitFunction · 0.85
sizeMethod · 0.45

Tested by 4

DoCheckFunction · 0.36
CheckUnusedFunction · 0.36
TestDescriptorFunction · 0.36
ImportDescriptorsMethod · 0.36