aboutsummaryrefslogtreecommitdiff
path: root/src/rpcwallet.cpp
AgeCommit message (Collapse)Author
2013-10-24RPC: error code changes and prevent crash with walletpassphrasePhilip Kaufmann
- fix crash with walletpassphrase by checking if RPC server is running and give a friendly error message how to fix this (fixes #3100) - add 3 new RPCErrorCodes RPC_SERVER_NOT_STARTED, RPC_NODE_ALREADY_ADDED and RCP_NODE_NOT_ADDED (I checked the source to not use a number already in use for RPC_SERVER_NOT_STARTED) - use the new codes where needed / missing - add missing use of RPC_INVALID_PARAMETER
2013-10-22Merge branch 'bugfix_unknownoutputs' of git://github.com/luke-jr/bitcoinGavin Andresen
Conflicts: src/wallet.cpp Fixed LogPrint/printf merge conflict.
2013-10-20Merge pull request #3119Pieter Wuille
db0e8cc Bump Year Number to 2013 (super3)
2013-10-20Bump Year Number to 2013super3
2013-10-15Reimplement CBlockLocator's chain-related logic in CChain.Pieter Wuille
This removes a few unused CBlockLocator methods, and moves the construction and fork-finding logic to CChain (which can do these more efficiently, as it has a height-indexable chain available). It also makes CBlockLocator independent from the validation code.
2013-10-11Refactor/encapsulate chain globals into a CChain classPieter Wuille
2013-10-02RPC validateaddress: test pwalletMain for NULL (no-wallet mode)Jeff Garzik
2013-10-01Support absence of wallet (pwalletMain==NULL) in several locations,Jeff Garzik
notably RPC.
2013-09-12Make validateaddress provide redeemScriptPeter Todd
2013-09-02Merge pull request #2948 from jgarzik/changeaddrGregory Maxwell
RPC: add getrawchangeaddress, for raw transaction change destinations
2013-08-28RPC: add getrawchangeaddress, for raw transaction change destinationsJeff Garzik
2013-08-23Remove fAllowReuse from GetKeyFromPool.Gregory Maxwell
With the GUI password fix this was always false.
2013-08-22Payment Protocol: X509-validated payment requestsGavin Andresen
Add support for a Payment Protocol to Bitcoin-Qt. Payment messages are protocol-buffer encoded and communicated over http(s), so this adds a dependency on the Google protocol buffer library, and requires Qt with OpenSSL support.
2013-08-22Refactor: Move GetAccountAddresses to CWalletGavin Andresen
2013-08-22Refactor: CAddressBookData for mapAddressBookGavin Andresen
Straight refactor, so mapAddressBook stores a CAddressBookData (which just contains a std::string) instead of a std::string. Preparation for payment protocol work, which will add the notion of refund addresses to the address book.
2013-08-16Clarified the listsinceblock help testMicha
Specifically, the fact that the command relates to wallet transactions.
2013-08-14Merge pull request #2776 from jgarzik/keypoolsizeGavin Andresen
RPC: keypoolrefill now permits optional size parameter, to bump keypool
2013-08-07Use existing RPC_INVALID_PARAMETER constantHan Lin Yap
2013-07-17Bugfix: Supress "address" key in transaction details, when the destination ↵Luke Dashjr
isn't recognized Previously, it would pass corrupt/random through base58.
2013-06-25RPC: keypoolrefill gains optional size parameterJeff Garzik
2013-06-25CWallet::TopUpKeyPool() takes optional pool size argumentJeff Garzik
Also, GetKeyPoolSize() now returns an accurate type, unsigned int.
2013-06-19Introduce a CChainParameters singleton class and regtest mode.Mike Hearn
The new class is accessed via the Params() method and holds most things that vary between main, test and regtest networks. The regtest mode has two purposes, one is to run the bitcoind/bitcoinj comparison tool which compares two separate implementations of the Bitcoin protocol looking for divergence. The other is that when run, you get a local node which can mine a single block instantly, which is highly convenient for testing apps during development as there's no need to wait 10 minutes for a block on the testnet.
2013-06-05Removed AcceptToMemoryPool method from CTransaction. This method belongs to ↵Eric Lombrozo
the mempool instance. Removed AreInputsStandard from CTransaction, made it a regular function in main. Moved CTransaction::GetOutputFor to CCoinsViewCache. Moved GetLegacySigOpCount and GetP2SHSigOpCount out of CTransaction into regular functions in main. Moved GetValueIn and HaveInputs from CTransaction into CCoinsViewCache. Moved AllowFree, ClientCheckInputs, CheckInputs, UpdateCoins, and CheckTransaction out of CTransaction and into main. Moved IsStandard and IsFinal out of CTransaction and put them in main as IsStandardTx and IsFinalTx. Moved GetValueOut out of CTransaction into main. Moved CTxIn, CTxOut, and CTransaction into core. Added minimum fee parameter to CTxOut::IsDust() temporarily until CTransaction is moved to core.h so that CTxOut needn't know about CTransaction.
2013-05-30Merge pull request #2625 from gavinandresen/walletlock_asioJeff Garzik
Use boost::asio::deadline_timer for walletpassphrase timeout
2013-05-30Merge pull request #2600 from sipa/keyrefactorJeff Garzik
Refactor key.cpp/.h
2013-05-30Merge pull request #2104 from al42and/listreceivedbyaddress_txidsJeff Garzik
listreceivedbyaddress now provides tx ids (issue #1149)
2013-05-30CSecret/CKey -> CKey/CPubKey split/refactorPieter Wuille
2013-05-30Make CPubKey statically allocatedPieter Wuille
2013-05-07Use boost::asio::deadline_timer for walletpassphrase timeoutGavin Andresen
New method in bitcoinrpc: RunLater, that uses a map of deadline timers to run a function later. Behavior of walletpassphrase is changed; before, calling walletpassphrase again before the lock timeout passed would result in: Error: Wallet is already unlocked. You would have to call lockwallet before walletpassphrase. Now: the last walletpassphrase with correct password wins, and overrides any previous timeout. Fixes issue# 1961 which was caused by spawning too many threads. Test plan: Start with encrypted wallet, password 'foo' NOTE: python -c 'import time; print("%d"%time.time())' ... will tell you current unix timestamp. Try: walletpassphrase foo 600 getinfo EXPECT: unlocked_until is about 10 minutes in the future walletpassphrase foo 1 sleep 2 sendtoaddress mun74Bvba3B1PF2YkrF4NsgcJwHXXh12LF 11 EXPECT: Error: Please enter the wallet passphrase with walletpassphrase first. walletpassphrase foo 600 walletpassphrase foo 0 getinfo EXPECT: wallet is locked (unlocked_until is 0) walletpassphrase foo 10 walletpassphrase foo 600 getinfo EXPECT: wallet is unlocked until 10 minutes in future walletpassphrase foo 60 walletpassphrase bar 600 EXPECT: Error, incorrect passphrase getinfo EXPECT: wallet still scheduled to lock 60 seconds from first (successful) walletpassphrase
2013-05-03CreateTransaction: return strFailReason on failureGavin Andresen
2013-04-08Merge pull request #2272 from gavinandresen/getbalancefixGavin Andresen
Fix getbalance discrepency
2013-04-03Rename util.h Sleep --> MilliSleepGavin Andresen
Two reasons for this change: 1. Need to always use boost::thread's sleep, even on Windows, so the sleeps can be interrupted (prior code used Windows' built-in Sleep). 2. I always forgot what units the old Sleep took.
2013-02-04Fix getbalance discrepencyGavin Andresen
Two changes: Use IsConfirmed() instead of IsFinal(), so 'getbalance "*" 0' uses the same 'is this output spendable' criteria as 'getbalance'. Fixes issue #172. And a tiny refactor to CWallet::GetBalance() (redundant call to IsFinal -- IsConfirmed calls IsFinal). getbalance with no arguments and 'getbalance "*" 0' could return different different results,
2013-01-11Add timeoffset to getinfo RPC callPeter Todd
Provides a method to get the difference between network adjusted time and local time from the RPC interface.
2012-12-16Updated help and tests for getreceivedby(account|address)Andrey
2012-12-13listreceivedbyaddress now provides tx ids (issue #1149)Andrey
2012-12-12Merge pull request #1861 from jgarzik/coinlockGavin Andresen
Add new RPC "lockunspent", to prevent spending of selected outputs
2012-11-27do not silently ignore errors on "backupwallet" RPC cmdPhilip Kaufmann
2012-11-16Merge pull request #2009 from sipa/fixmoveGavin Andresen
Prevent RPC 'move' from deadlocking
2012-11-15Add new RPC "lockunspent", to prevent spending of selected outputsJeff Garzik
and associated RPC "listlockunspent". This is a memory-only filter, which is empty when a node restarts.
2012-11-14Prevent RPC 'move' from deadlockingPieter Wuille
It seemed to create two CWalletDB objects that both grab the database lock.
2012-11-04Merge pull request #1830 from Diapolo/trans_rem_spacesWladimir J. van der Laan
fix some double-spaces in strings
2012-10-29New createmultisig rpc commandGavin Andresen
This is to support the signrawtransaction API call; given the public keys involved in a multisig transaction, this gives back the redeemScript needed to sign it.
2012-10-25fix some double-spaces in stringsPhilip Kaufmann
- remove some unneeded stuff in sendcoinsentry.ui - harmonize some "Error:"-messages
2012-10-19Use CHashWriter also in SignatureHash(), and for message signingPieter Wuille
2012-10-07Merge pull request #1859 from Diapolo/proxy_locksPieter Wuille
add LOCK() for proxy related data-structures
2012-10-04Document RPC error codesWladimir J. van der Laan
Replace all "magic values" in RPCError(...) by constants.
2012-10-04add LOCK() for proxy related data-structuresPhilip Kaufmann
- fix #1560 by properly locking proxy related data-structures - update GetProxy() and introduce GetNameProxy() to be able to use a thread-safe local copy from proxyInfo and nameproxyInfo - update usage of GetProxy() all over the source to match the new behaviour, as it now fills a full proxyType object - rename GetNameProxy() into HaveNameProxy() to be more clear
2012-10-01Merge branch '2012_09_fixwformat' of github.com:laanwj/bitcoinGavin Andresen
2012-10-01fix -Wformat warnings all over the sourcePhilip Kaufmann