Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 265 Lines • ▼ Show 20 Lines | const CWalletTx *CWallet::GetWalletTx(const TxId &txid) const { | ||||
if (it == mapWallet.end()) { | if (it == mapWallet.end()) { | ||||
return nullptr; | return nullptr; | ||||
} | } | ||||
return &(it->second); | return &(it->second); | ||||
} | } | ||||
void CWallet::UpgradeKeyMetadata() { | void CWallet::UpgradeKeyMetadata() { | ||||
AssertLockHeld(m_spk_man->cs_wallet); | |||||
if (m_spk_man) { | if (m_spk_man) { | ||||
AssertLockHeld(m_spk_man->cs_wallet); | |||||
m_spk_man->UpgradeKeyMetadata(); | m_spk_man->UpgradeKeyMetadata(); | ||||
} | } | ||||
} | } | ||||
bool CWallet::Unlock(const SecureString &strWalletPassphrase, | bool CWallet::Unlock(const SecureString &strWalletPassphrase, | ||||
bool accept_no_keys) { | bool accept_no_keys) { | ||||
CCrypter crypter; | CCrypter crypter; | ||||
CKeyingMaterial _vMasterKey; | CKeyingMaterial _vMasterKey; | ||||
▲ Show 20 Lines • Show All 2,853 Lines • ▼ Show 20 Lines | txNew.nLockTime = GetLocktimeForNewTransaction(chain(), locked_chainIn); | ||||
SigHashType sigHashType = SigHashType().withForkId(); | SigHashType sigHashType = SigHashType().withForkId(); | ||||
int nIn = 0; | int nIn = 0; | ||||
for (const auto &coin : selected_coins) { | for (const auto &coin : selected_coins) { | ||||
const CScript &scriptPubKey = coin.txout.scriptPubKey; | const CScript &scriptPubKey = coin.txout.scriptPubKey; | ||||
SignatureData sigdata; | SignatureData sigdata; | ||||
const SigningProvider *provider = GetSigningProvider(); | const SigningProvider *provider = GetSigningProvider(); | ||||
if (!provider) { | if (!provider || | ||||
return false; | !ProduceSignature( | ||||
} | |||||
if (!ProduceSignature( | |||||
*provider, | *provider, | ||||
MutableTransactionSignatureCreator( | MutableTransactionSignatureCreator( | ||||
&txNew, nIn, coin.txout.nValue, sigHashType), | &txNew, nIn, coin.txout.nValue, sigHashType), | ||||
scriptPubKey, sigdata)) { | scriptPubKey, sigdata)) { | ||||
strFailReason = _("Signing transaction failed").translated; | strFailReason = _("Signing transaction failed").translated; | ||||
return false; | return false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,345 Lines • Show Last 20 Lines |