Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 1,901 Lines • ▼ Show 20 Lines | for (const CKeyID &id : ordered_pubkeys) { | ||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
bool CWallet::ImportScriptPubKeys(const std::string &label, | bool CWallet::ImportScriptPubKeys(const std::string &label, | ||||
const std::set<CScript> &script_pub_keys, | const std::set<CScript> &script_pub_keys, | ||||
const bool have_solving_data, | const bool have_solving_data, | ||||
const bool internal, | const bool apply_label, | ||||
const int64_t timestamp) { | const int64_t timestamp) { | ||||
WalletBatch batch(*database); | WalletBatch batch(*database); | ||||
for (const CScript &script : script_pub_keys) { | for (const CScript &script : script_pub_keys) { | ||||
if (!have_solving_data || !::IsMine(*this, script)) { | if (!have_solving_data || !::IsMine(*this, script)) { | ||||
// Always call AddWatchOnly for non-solvable watch-only, so that | // Always call AddWatchOnly for non-solvable watch-only, so that | ||||
// watch timestamp gets updated | // watch timestamp gets updated | ||||
if (!AddWatchOnlyWithDB(batch, script, timestamp)) { | if (!AddWatchOnlyWithDB(batch, script, timestamp)) { | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
CTxDestination dest; | CTxDestination dest; | ||||
ExtractDestination(script, dest); | ExtractDestination(script, dest); | ||||
if (!internal && IsValidDestination(dest)) { | if (apply_label && IsValidDestination(dest)) { | ||||
SetAddressBookWithDB(batch, dest, label, "receive"); | SetAddressBookWithDB(batch, dest, label, "receive"); | ||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
int64_t CalculateMaximumSignedTxSize(const CTransaction &tx, | int64_t CalculateMaximumSignedTxSize(const CTransaction &tx, | ||||
const CWallet *wallet, bool use_max_sig) { | const CWallet *wallet, bool use_max_sig) { | ||||
▲ Show 20 Lines • Show All 3,234 Lines • Show Last 20 Lines |