Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 1,605 Lines • ▼ Show 20 Lines | bool CWallet::IsHDEnabled() const { | ||||
return !hdChain.seed_id.IsNull(); | return !hdChain.seed_id.IsNull(); | ||||
} | } | ||||
int64_t CWalletTx::GetTxTime() const { | int64_t CWalletTx::GetTxTime() const { | ||||
int64_t n = nTimeSmart; | int64_t n = nTimeSmart; | ||||
return n ? n : nTimeReceived; | return n ? n : nTimeReceived; | ||||
} | } | ||||
// Helper for producing a max-sized low-S signature (eg 72 bytes) | // Helper for producing a max-sized low-S low-R signature (eg 71 bytes) | ||||
bool CWallet::DummySignInput(CTxIn &tx_in, const CTxOut &txout) const { | bool CWallet::DummySignInput(CTxIn &tx_in, const CTxOut &txout) const { | ||||
// Fill in dummy signatures for fee calculation. | // Fill in dummy signatures for fee calculation. | ||||
const CScript &scriptPubKey = txout.scriptPubKey; | const CScript &scriptPubKey = txout.scriptPubKey; | ||||
SignatureData sigdata; | SignatureData sigdata; | ||||
if (!ProduceSignature(*this, DUMMY_SIGNATURE_CREATOR, scriptPubKey, | if (!ProduceSignature(*this, DUMMY_SIGNATURE_CREATOR, scriptPubKey, | ||||
sigdata)) { | sigdata)) { | ||||
return false; | return false; | ||||
} | } | ||||
UpdateInput(tx_in, sigdata); | UpdateInput(tx_in, sigdata); | ||||
return true; | return true; | ||||
} | } | ||||
// Helper for producing a bunch of max-sized low-S signatures (eg 72 bytes) | // Helper for producing a bunch of max-sized low-S low-R signatures (eg 71 | ||||
// bytes) | |||||
bool CWallet::DummySignTx(CMutableTransaction &txNew, | bool CWallet::DummySignTx(CMutableTransaction &txNew, | ||||
const std::vector<CTxOut> &txouts) const { | const std::vector<CTxOut> &txouts) const { | ||||
// Fill in dummy signatures for fee calculation. | // Fill in dummy signatures for fee calculation. | ||||
int nIn = 0; | int nIn = 0; | ||||
for (const auto &txout : txouts) { | for (const auto &txout : txouts) { | ||||
if (!DummySignInput(txNew.vin[nIn], txout)) { | if (!DummySignInput(txNew.vin[nIn], txout)) { | ||||
return false; | return false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 3,191 Lines • Show Last 20 Lines |