diff --git a/src/base58.cpp b/src/base58.cpp --- a/src/base58.cpp +++ b/src/base58.cpp @@ -231,8 +231,6 @@ CBitcoinAddress(const char *pszAddress) { SetString(pszAddress); } CTxDestination Get() const; - bool GetKeyID(CKeyID &keyID) const; - bool IsScript() const; }; class CBitcoinAddressVisitor : public boost::static_visitor { @@ -289,22 +287,6 @@ } } -bool CBitcoinAddress::GetKeyID(CKeyID &keyID) const { - if (!IsValid() || - vchVersion != Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS)) { - return false; - } - uint160 id; - memcpy(&id, &vchData[0], 20); - keyID = CKeyID(id); - return true; -} - -bool CBitcoinAddress::IsScript() const { - return IsValid() && - vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS); -} - void CBitcoinSecret::SetKey(const CKey &vchSecret) { assert(vchSecret.IsValid()); SetData(Params().Base58Prefix(CChainParams::SECRET_KEY), vchSecret.begin(), diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp --- a/src/qt/addresstablemodel.cpp +++ b/src/qt/addresstablemodel.cpp @@ -230,8 +230,7 @@ editStatus = OK; if (role == Qt::EditRole) { - /* For SetAddressBook / DelAddressBook */ - LOCK(wallet->cs_wallet); + LOCK(wallet->cs_wallet); /* For SetAddressBook / DelAddressBook */ CTxDestination curAddress = DecodeDestination(rec->address.toStdString()); if (index.column() == Label) { diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -746,9 +746,8 @@ // if listMode or change => show bitcoin address. In tree mode, // address is not shown again for direct wallet address outputs - if (!treeMode || (!(sAddress == sWalletAddress))) { + if (!treeMode || (!(sAddress == sWalletAddress))) itemOutput->setText(COLUMN_ADDRESS, sAddress); - } } // label diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -119,7 +119,7 @@ // Generate a dummy address with invalid CRC, starting with the network prefix. static std::string DummyAddress(const CChainParams ¶ms) { - std::vector sourcedata = + std::vector sourcedata = params.Base58Prefix(CChainParams::PUBKEY_ADDRESS); sourcedata.insert(sourcedata.end(), dummydata, dummydata + sizeof(dummydata)); diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp --- a/src/qt/paymentserver.cpp +++ b/src/qt/paymentserver.cpp @@ -549,8 +549,10 @@ addresses.append(QString::fromStdString(EncodeDestination(dest))); } else if (!recipient.authenticatedMerchant.isEmpty()) { // Unauthenticated payment requests to custom bitcoin addresses are - // not supported (there is no good way to tell the user where they - // are paying in a way they'd have a chance of understanding). + // not supported + // (there is no good way to tell the user where they are paying in a + // way they'd + // have a chance of understanding). Q_EMIT message(tr("Payment request rejected"), tr("Unverified payment requests to custom payment " "scripts are unsupported."), diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp --- a/src/qt/transactiondesc.cpp +++ b/src/qt/transactiondesc.cpp @@ -90,8 +90,8 @@ // Offline transaction if (nNet > 0) { // Credit - if (IsValidDestinationString(rec->address)) { - CTxDestination address = DecodeDestination(rec->address); + CTxDestination address = DecodeDestination(rec->address); + if (IsValidDestination(address)) { if (wallet->mapAddressBook.count(address)) { strHTML += "" + tr("From") + ": " + tr("unknown") + "
";