MCPcopy Create free account
hub / github.com/citp/BlockSci / toPrettyString

Method toPrettyString

src/scripts/multisig_script.cpp:42–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 }
41
42 std::string ScriptAddress<AddressType::MULTISIG>::toPrettyString() const {
43 std::stringstream ss;
44 ss << "MultisigAddress(" << static_cast<int>(getRequired()) << " of " << static_cast<int>(getTotal()) << " multisig with addresses ";
45 uint8_t i = 0;
46 RANGES_FOR(auto address, getAddresses()) {
47 script::MultisigPubkey pubkeyScript(address.scriptNum, getAccess());
48 ss << pubkeyScript.toPrettyString();
49 if (i < getTotal() - 1) {
50 ss << ", ";
51 }
52 i++;
53 }
54 ss << ")";
55 return ss.str();
56 }
57} // namespace blocksci

Callers 1

RANGES_FORFunction · 0.45

Calls 2

getRequiredFunction · 0.85
getTotalFunction · 0.85

Tested by

no test coverage detected