From 95d888a6d1f659a5cb81124e0d97966b9de1f139 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Wed, 13 Jul 2011 11:56:38 +0200 Subject: Key import and export Introduces two new RPC calls: * dumpprivkey: retrieve the private key corresponding to an address * importprivkey: add a private key to your wallet The private key format is analoguous to the address format. It is a 51-character base58-encoded string, that includes a version number and a checksum. Includes patch by mhanne: * add optional account parameter for importprivkey, if omitted use default --- src/wallet.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/wallet.cpp') diff --git a/src/wallet.cpp b/src/wallet.cpp index f9157e01d5..87f5dfd659 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -224,6 +224,15 @@ void CWallet::WalletUpdateSpent(const CTransaction &tx) } } +void CWallet::MarkDirty() +{ + CRITICAL_BLOCK(cs_wallet) + { + BOOST_FOREACH(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet) + item.second.MarkDirty(); + } +} + bool CWallet::AddToWallet(const CWalletTx& wtxIn) { uint256 hash = wtxIn.GetHash(); @@ -1445,6 +1454,7 @@ void CWallet::GetAllReserveAddresses(set& setAddress) CWalletDB walletdb(strWalletFile); CRITICAL_BLOCK(cs_main) + CRITICAL_BLOCK(cs_wallet) BOOST_FOREACH(const int64& id, setKeyPool) { CKeyPool keypool; -- cgit v1.2.3