aboutsummaryrefslogtreecommitdiff
path: root/src/rpcwallet.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Move `createmultisig` from rpcwallet to rpcmiscWladimir J. van der Laan2013-12-131-98/+2
| | | | | | | | Enables it in --disable-wallet compiles.
* | Move `validateaddress` from rpcwallet to rpcmiscWladimir J. van der Laan2013-12-131-81/+0
| | | | | | | | | | Enables it in --disable-wallet compiles. Delimit wallet-using part using #ifdef ENABLE_WALLET.
* | Move `settxfee` from rpcblockchain to rpcwalletWladimir J. van der Laan2013-12-131-0/+25
| | | | | | | | `settxfee` only affects the wallet, not the block chain.
* | rpcwallet: use EnsureWalletIsUnlocked() where possiblePhilip Kaufmann2013-12-091-6/+5
| | | | | | | | | | | | - replaces a pwalletMain->IsLocked() check - in keypoolrefill init kpSize to 0 as we have the logic to determine max kpSize in pwalletMain->TopUpKeyPool() anyway
* | Move getinfo to rpcnet.cppWladimir J. van der Laan2013-12-041-58/+0
| | | | | | | | | | | | | | | | Where to place `getinfo` is a difficult issue as it shows information from the wallet, net and block chain. However, I moved it out of rpcwallet as the command needs also to be available without wallet.
* | Move HelpExample* from rpcwallet to rpcserverWladimir J. van der Laan2013-12-041-9/+0
|/ | | | | General functions used throughout the RPC framework don't belong in rpcwallet.
* Refactor: move GetValueIn(tx) to tx.GetValueIn()Gavin Andresen2013-11-301-1/+1
| | | | GetValueIn makes more sense as a CTransaction member.
* Split up bitcoinrpc (code movement only)Wladimir J. van der Laan2013-11-271-3/+1
| | | | | | | | | | | | | | Split bitcoinrpc up into - rpcserver: bitcoind RPC server - rpcclient: bitcoin-cli RPC client - rpcprotocol: shared common HTTP/JSON-RPC protocol code One step towards making bitcoin-cli independent from the rest of the code, and thus a smaller executable that doesn't have to be linked against leveldb. This commit only does code movement, there are no functional changes.
* Issue #1865 - Clean up RPC help messagessje2013-11-131-91/+660
| | | | | | | | | | | | | | | | | | | Based on the proposal, update the help message of rpc methods - strings arguments are in double quotes rather than square brackets - numeric arguments have no quotes (and no default value) - optional parameters are surrounded by round brackets - json arguments are strings but don't use double quotes Added 3 sections for the details - Arguments: lists each argument, it's type, required or not, a default, and a description - Result: The method result, with json format if applicable, type, and a description - Examples: examples calls using bitcoin-cli and curl for json rpc call Problems - maybe this is too verbose - lines might be too long - description are not good or complete - examples may be too much
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-50/+59
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* RPC: error code changes and prevent crash with walletpassphrasePhilip Kaufmann2013-10-241-1/+3
| | | | | | | | | | - 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
* Merge branch 'bugfix_unknownoutputs' of git://github.com/luke-jr/bitcoinGavin Andresen2013-10-221-2/+9
|\ | | | | | | | | | | Conflicts: src/wallet.cpp Fixed LogPrint/printf merge conflict.
| * Bugfix: Supress "address" key in transaction details, when the destination ↵Luke Dashjr2013-07-171-2/+9
| | | | | | | | | | | | isn't recognized Previously, it would pass corrupt/random through base58.
* | Merge pull request #3119Pieter Wuille2013-10-201-1/+1
|\ \ | | | | | | | | | db0e8cc Bump Year Number to 2013 (super3)
| * | Bump Year Number to 2013super32013-10-201-1/+1
| | |
* | | Reimplement CBlockLocator's chain-related logic in CChain.Pieter Wuille2013-10-151-1/+3
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Refactor/encapsulate chain globals into a CChain classPieter Wuille2013-10-111-19/+4
|/ /
* | RPC validateaddress: test pwalletMain for NULL (no-wallet mode)Jeff Garzik2013-10-021-2/+2
| |
* | Support absence of wallet (pwalletMain==NULL) in several locations,Jeff Garzik2013-10-011-7/+11
| | | | | | | | notably RPC.
* | Make validateaddress provide redeemScriptPeter Todd2013-09-121-0/+1
| |
* | Merge pull request #2948 from jgarzik/changeaddrGregory Maxwell2013-09-021-0/+23
|\ \ | | | | | | RPC: add getrawchangeaddress, for raw transaction change destinations
| * | RPC: add getrawchangeaddress, for raw transaction change destinationsJeff Garzik2013-08-281-0/+23
| | |
* | | Remove fAllowReuse from GetKeyFromPool.Gregory Maxwell2013-08-231-2/+2
|/ / | | | | | | With the GUI password fix this was always false.
* | Payment Protocol: X509-validated payment requestsGavin Andresen2013-08-221-4/+4
| | | | | | | | | | | | | | | | 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.
* | Refactor: Move GetAccountAddresses to CWalletGavin Andresen2013-08-221-13/+1
| |
* | Refactor: CAddressBookData for mapAddressBookGavin Andresen2013-08-221-16/+16
| | | | | | | | | | | | | | | | 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.
* | Clarified the listsinceblock help testMicha2013-08-161-1/+1
| | | | | | | | | | Specifically, the fact that the command relates to wallet transactions.
* | Merge pull request #2776 from jgarzik/keypoolsizeGavin Andresen2013-08-141-5/+12
|\ \ | | | | | | RPC: keypoolrefill now permits optional size parameter, to bump keypool
| * | RPC: keypoolrefill gains optional size parameterJeff Garzik2013-06-251-4/+11
| | |
| * | CWallet::TopUpKeyPool() takes optional pool size argumentJeff Garzik2013-06-251-1/+1
| |/ | | | | | | Also, GetKeyPoolSize() now returns an accurate type, unsigned int.
* / Use existing RPC_INVALID_PARAMETER constantHan Lin Yap2013-08-071-3/+3
|/
* Introduce a CChainParameters singleton class and regtest mode.Mike Hearn2013-06-191-1/+1
| | | | | | | | | | | | | 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.
* Removed AcceptToMemoryPool method from CTransaction. This method belongs to ↵Eric Lombrozo2013-06-051-5/+5
| | | | | | | | | | | | | | | | | 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.
* Merge pull request #2625 from gavinandresen/walletlock_asioJeff Garzik2013-05-301-56/+11
|\ | | | | Use boost::asio::deadline_timer for walletpassphrase timeout
| * Use boost::asio::deadline_timer for walletpassphrase timeoutGavin Andresen2013-05-071-56/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge pull request #2600 from sipa/keyrefactorJeff Garzik2013-05-301-7/+9
|\ \ | | | | | | Refactor key.cpp/.h
| * | CSecret/CKey -> CKey/CPubKey split/refactorPieter Wuille2013-05-301-6/+8
| | |
| * | Make CPubKey statically allocatedPieter Wuille2013-05-301-1/+1
| |/
* | Merge pull request #2104 from al42and/listreceivedbyaddress_txidsJeff Garzik2013-05-301-1/+13
|\ \ | |/ |/| listreceivedbyaddress now provides tx ids (issue #1149)
| * Updated help and tests for getreceivedby(account|address)Andrey2012-12-161-3/+7
| |
| * listreceivedbyaddress now provides tx ids (issue #1149)Andrey2012-12-131-0/+8
| |
* | CreateTransaction: return strFailReason on failureGavin Andresen2013-05-031-6/+3
| |
* | Merge pull request #2272 from gavinandresen/getbalancefixGavin Andresen2013-04-081-2/+2
|\ \ | | | | | | Fix getbalance discrepency
| * | Fix getbalance discrepencyGavin Andresen2013-02-041-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | 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,
* | Rename util.h Sleep --> MilliSleepGavin Andresen2013-04-031-1/+1
| | | | | | | | | | | | | | | | 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.
* | Add timeoffset to getinfo RPC callPeter Todd2013-01-111-0/+1
|/ | | | | Provides a method to get the difference between network adjusted time and local time from the RPC interface.
* Merge pull request #1861 from jgarzik/coinlockGavin Andresen2012-12-121-1/+76
|\ | | | | Add new RPC "lockunspent", to prevent spending of selected outputs
| * Add new RPC "lockunspent", to prevent spending of selected outputsJeff Garzik2012-11-151-1/+76
| | | | | | | | | | | | and associated RPC "listlockunspent". This is a memory-only filter, which is empty when a node restarts.
* | do not silently ignore errors on "backupwallet" RPC cmdPhilip Kaufmann2012-11-271-1/+2
| |
* | Merge pull request #2009 from sipa/fixmoveGavin Andresen2012-11-161-2/+2
|\ \ | |/ |/| Prevent RPC 'move' from deadlocking