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

Function DummyAddress

src/qt/guiutil.cpp:109–129  ·  view source on GitHub ↗

Return a pre-generated dummy bech32m address (P2TR) with invalid checksum.

Source from the content-addressed store, hash-verified

107
108// Return a pre-generated dummy bech32m address (P2TR) with invalid checksum.
109static std::string DummyAddress(const CChainParams &params)
110{
111 std::string addr;
112 switch (params.GetChainType()) {
113 case ChainType::MAIN:
114 addr = "bc1p35yvjel7srp783ztf8v6jdra7dhfzk5jaun8xz2qp6ws7z80n4tq2jku9f";
115 break;
116 case ChainType::SIGNET:
117 case ChainType::TESTNET:
118 case ChainType::TESTNET4:
119 addr = "tb1p35yvjel7srp783ztf8v6jdra7dhfzk5jaun8xz2qp6ws7z80n4tqa6qnlg";
120 break;
121 case ChainType::REGTEST:
122 addr = "bcrt1p35yvjel7srp783ztf8v6jdra7dhfzk5jaun8xz2qp6ws7z80n4tqsr2427";
123 break;
124 } // no default case, so the compiler can warn about missing cases
125 assert(!addr.empty());
126
127 if (Assume(!IsValidDestinationString(addr))) return addr;
128 return {};
129}
130
131void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
132{

Callers 1

setupAddressWidgetFunction · 0.85

Calls 3

IsValidDestinationStringFunction · 0.85
GetChainTypeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected