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

Method CBitcoinAddress

src/scripts/bitcoin_base58.cpp:210–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208
209
210 CBitcoinAddress::CBitcoinAddress(const uint160 &dest, AddressType::Enum type, const ChainConfiguration &config) {
211 if (type == AddressType::Enum::PUBKEYHASH || type == AddressType::Enum::PUBKEY || type == AddressType::Enum::MULTISIG_PUBKEY) {
212 SetData(config.pubkeyPrefix, &dest, sizeof(dest));
213 } else if (type == AddressType::Enum::SCRIPTHASH) {
214 SetData(config.scriptPrefix, &dest, sizeof(dest));
215 }
216 }
217
218 CBitcoinAddress::CBitcoinAddress(const uint160 &dest, const std::vector<unsigned char>& version) {
219 SetData(version, &dest, sizeof(dest));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected