GUI: Use CT address for examples

This commit is contained in:
Luke Dashjr 2019-01-08 15:48:50 +00:00 committed by Gregory Sanders
parent 0d11cd0de9
commit d4d45b6f0a

View file

@ -88,13 +88,15 @@ QFont fixedPitchFont()
}
// Just some dummy data to generate a convincing random-looking (but consistent) address
static const uint8_t dummydata[] = {0xeb,0x15,0x23,0x1d,0xfc,0xeb,0x60,0x92,0x58,0x86,0xb6,0x7d,0x06,0x52,0x99,0x92,0x59,0x15,0xae,0xb1,0x72,0xc0,0x66,0x47};
static const uint8_t dummydata[33] = {3};
// Generate a dummy address with invalid CRC, starting with the network prefix.
static std::string DummyAddress(const CChainParams &params)
{
std::vector<unsigned char> sourcedata = params.Base58Prefix(CChainParams::PUBKEY_ADDRESS);
sourcedata.insert(sourcedata.end(), dummydata, dummydata + sizeof(dummydata));
std::vector<unsigned char> sourcedata;
CPubKey dummy_key(&dummydata[0], &dummydata[33]);
ScriptHash script_dest(uint160(), dummy_key);
DecodeBase58(EncodeDestination(script_dest), sourcedata);
for(int i=0; i<256; ++i) { // Try every trailing byte
std::string s = EncodeBase58(sourcedata.data(), sourcedata.data() + sourcedata.size());
if (!IsValidDestinationString(s)) {