MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / LockCoin

Method LockCoin

src/wallet/wallet.cpp:2745–2754  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2743}
2744
2745bool CWallet::LockCoin(const COutPoint& output, bool persist)
2746{
2747 AssertLockHeld(cs_wallet);
2748 LoadLockedCoin(output, persist);
2749 if (persist) {
2750 WalletBatch batch(GetDatabase());
2751 return batch.WriteLockedUTXO(output);
2752 }
2753 return true;
2754}
2755
2756bool CWallet::UnlockCoin(const COutPoint& output)
2757{

Callers 7

ExportWatchOnlyWalletFunction · 0.80
FundTransactionFunction · 0.80
lockCoinMethod · 0.80
BOOST_FIXTURE_TEST_CASEFunction · 0.80
TestCoinsResultFunction · 0.80
lockunspentFunction · 0.80
sendallFunction · 0.80

Calls 1

WriteLockedUTXOMethod · 0.80

Tested by 2

BOOST_FIXTURE_TEST_CASEFunction · 0.64
TestCoinsResultFunction · 0.64