Commit graph

55 commits

Author SHA1 Message Date
Daniel Cousens a0eaff8a1d move rpc* to rpc/ 2016-01-21 08:36:55 +11:00
MarcoFalke fa24439ff3 Bump copyright headers to 2015 2015-12-13 18:08:39 +01:00
Alex Morcos 56106a3300 Expose RPC calls for estimatesmart functions
Also add testing for estimatesmartfee in smartfees.py
2015-11-16 15:42:31 -05:00
Wladimir J. van der Laan bf7c1958d1
Merge pull request #5936
212bcca Add optional locktime to createrawtransaction (Tom Harding)
2015-10-23 12:47:19 +02:00
Jonas Schnelli 9623e93473 [Univalue] add univalue over subtree
similar to secp256k1 include and compile univalue over a subtree
2015-10-01 10:49:57 +02:00
Tom Harding 212bcca920 Add optional locktime to createrawtransaction
A non-zero locktime also causes input sequences to be set to
non-max, activating the locktime.
2015-08-10 10:23:59 -07:00
Matt Corallo a1d7df3236 Add importpubkey method to import a watch-only pubkey 2015-07-20 16:01:37 -07:00
Matt Corallo 907a425aa5 Add p2sh option to importaddress to import redeemScripts 2015-07-20 16:01:37 -07:00
Wladimir J. van der Laan 726e28643c
Merge pull request #6247
076badb Add getblockheader RPC call (Peter Todd)
2015-07-02 18:53:18 +02:00
Wladimir J. van der Laan 91389e51c7
Merge pull request #6088
2085895 fundrawtransaction tests (Jonas Schnelli)
21bbd92 Add fundrawtransaction RPC method (Matt Corallo)
1e0d1a2 Add FundTransaction method to wallet (Matt Corallo)
2d84e22 Small tweaks to CCoinControl for fundrawtransaction (Matt Corallo)
9b4e7d9 Add DummySignatureCreator which just creates zeroed sigs (Pieter Wuille)
2015-06-23 12:40:00 +02:00
Jonas Schnelli 4e36e9bcc7 setban: rewrite to UniValue, allow absolute bantime 2015-06-17 21:40:55 +02:00
Jonas Schnelli d930b26a26 [RPC] add setban/listbanned/clearbanned RPC commands 2015-06-17 21:40:55 +02:00
Matt Corallo 21bbd920e5 Add fundrawtransaction RPC method 2015-06-11 01:03:23 -07:00
Peter Todd 076badb60f
Add getblockheader RPC call
Alternative to getblock that works even when the block itself has been
pruned, returning all available information.
2015-06-05 17:07:58 -02:30
Wladimir J. van der Laan 043df2b568 Simplify RPCclient, adapt json_parse_error test
# Conflicts:
#	src/test/rpc_tests.cpp
2015-06-04 13:18:35 +02:00
Jonas Schnelli 9a8897f4ac Remove JSON Spirit wrapper, remove JSON Spirit leftovers
- implement find_value() function for UniValue
- replace all Array/Value/Object types with UniValues, remove JSON Spirit to UniValue wrapper
- remove JSON Spirit sources
2015-06-04 09:16:21 +02:00
Jonas Schnelli 3df0411ad9 remove JSON Spirit UniValue wrapper 2015-06-04 09:16:06 +02:00
Jonas Schnelli 0c5b2cf69a univalue: add support for real, fix percision and make it json_spirit compatible
- avoid breaking the API because of different number/percision handling
2015-06-04 09:16:06 +02:00
Jonas Schnelli 21c10de8c2 special threatment for null,true,false because they are non valid json 2015-06-04 09:16:06 +02:00
Jonas Schnelli 53b4671a9d extend conversion to UniValue 2015-06-04 09:16:05 +02:00
Jeff Garzik 15982a8b69 Convert tree to using univalue. Eliminate all json_spirit uses. 2015-06-04 09:16:05 +02:00
Wladimir J. van der Laan 8a10000222
Merge pull request #6022
b74dcb3 Separate CTranslationInterface from CClientUIInterface (Jorge Timón)
2015-04-30 16:37:18 +02:00
Matt Corallo 59ed61b389 Add RPC call to generate and verify merkle blocks 2015-04-23 17:50:39 -07:00
Jorge Timón b74dcb3b4a Separate CTranslationInterface from CClientUIInterface 2015-04-16 19:58:48 +02:00
Pieter Wuille 6b04508e37 Introduce separate 'generate' RPC call 2015-04-01 11:47:10 -07:00
Cozz Lovan 292623adf5 Subtract fee from amount
Fixes #2724 and #1570.

Adds the
automatically-subtract-the-fee-from-the-amount-and-send-whats-left
feature to the GUI and RPC (sendtoaddress,sendmany).
2015-03-13 11:04:18 +01:00
sandakersmann f914f1a746
Added "Core" to copyright headers
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-19 19:55:32 +01:00
Michael Ford 72fb3d295a Update comments in src/rpc* to be doxygen compatible 2014-11-20 10:19:39 +08:00
Gavin Andresen a8b2ce557d
regression test only setmocktime RPC call 2014-11-17 10:33:49 -05:00
Wladimir J. van der Laan 5b9d1e10a8
Merge pull request #4863
1a61396 fix missing gettransaction entries in rpcclient (Benedict Chan)
57e1716 update rpc help message for gettransaction to add includeWatchonly param (Benedict Chan)
2014-09-17 13:05:41 +02:00
Benedict Chan 1a613963e1 fix missing gettransaction entries in rpcclient 2014-09-16 11:12:01 +00:00
imharrywu e9992fb645 remove include of chainparams.h
chainparams.h has not been used in this cpp file already, consider to remove it for clean.
2014-09-16 15:53:04 +08:00
Philip Kaufmann 611116d4e3 header include cleanup
- ensures alphabetical ordering for includes etc. in source file headers
2014-09-14 12:43:56 +02:00
Cozz Lovan ebdcc360b6 Add helptexts for -whitelist and rpc prioritisetransaction and switch to bitcoin instead of satoshis 2014-07-15 05:20:52 +02:00
JaSK 0fa2f8899a added includedWatchonly argument to listreceivedbyaddress/...account 2014-07-02 15:48:39 +02:00
JaSK f87ba3df64 added includeWatchonly argument to 'gettransaction' because it affects balance calculation 2014-07-02 15:48:39 +02:00
JaSK d7d5d23b77 Added argument to listtransactions and listsinceblock to include watchonly addresses 2014-07-02 15:48:39 +02:00
JaSK 83f3543f20 Added argument to listaccounts to include watchonly addresses 2014-07-02 15:48:38 +02:00
JaSK d4640d7d8c Added argument to getbalance to include watchonly addresses and fixed errors in balance calculation. 2014-07-02 15:48:38 +02:00
Pieter Wuille c8988460a2 Add support for watch-only addresses
Changes:
* Add Add/Have WatchOnly methods to CKeyStore, and implementations
  in CBasicKeyStore.
* Add similar methods to CWallet, and support entries for it in
  CWalletDB.
* Make IsMine in script/wallet return a new enum 'isminetype',
  rather than a boolean. This allows distinguishing between
  spendable and unspendable coins.
* Add a field fSpendable to COutput (GetAvailableCoins' return type).
* Mark watchonly coins in listunspent as 'watchonly': true.
* Add 'watchonly' to validateaddress, suppressing script/pubkey/...
  in this case.

Based on a patch by Eric Lombrozo.

Conflicts:
	src/qt/walletmodel.cpp
	src/rpcserver.cpp
	src/wallet.cpp
2014-07-02 15:48:37 +02:00
Jeff Garzik e35b37b1b8 RPC client: Simplify command line string-to-JSON-value conversion code
By default, all command line parameters are converted into JSON string
values.  There is no need to manually specify the incoming type.

A binary decision "parse as string or JSON?" is all that's necessary.

Convert to a simple class, initialized at runtime startup, which offers
a quick lookup to answer "parse as JSON?" conversion question.

Future parameter conversions need only to indicate the method name
and zero-based index of the parameter needing JSON parsing.
2014-06-26 22:18:30 -04:00
Luke Dashjr 2a72d4591f JSON-RPC method: prioritisetransaction <txid> <priority delta> <priority tx fee>
Accepts the transaction into mined blocks at a higher (or lower) priority
2014-06-26 11:49:46 +00:00
Wladimir J. van der Laan b750cf1fb9
Remove cli functionality from bitcoind
As it says on the tin. It was deprecated in version 0.9, and
at some point it should be removed.

Removes the dependency of bitcoind on libbitcoin-cli.a. Move
some functions that used to be shared but are now only used in
bitcoin-cli.cpp to that file.

After this change, an error is printed (and exit code 1 is returned)
when the user tries to send RPC commands using bitcoind.
2014-06-15 15:38:22 +02:00
Jeff Garzik 0cafb63025
bitcoin-cli, rpcclient: prefer EXIT_FAILURE cstdlib constant
A more complex construction via abs() yields the same end result.

Rebased-From: 34ff109
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-06-15 14:47:04 +02:00
Gavin Andresen 171ca7745e estimatefee / estimatepriority RPC methods
New RPC methods: return an estimate of the fee (or priority) a
transaction needs to be likely to confirm in a given number of
blocks.

Mike Hearn created the first version of this method for estimating fees.
It works as follows:

For transactions that took 1 to N (I picked N=25) blocks to confirm,
keep N buckets with at most 100 entries in each recording the
fees-per-kilobyte paid by those transactions.

(separate buckets are kept for transactions that confirmed because
they are high-priority)

The buckets are filled as blocks are found, and are saved/restored
in a new fee_estiamtes.dat file in the data directory.

A few variations on Mike's initial scheme:

To estimate the fee needed for a transaction to confirm in X buckets,
all of the samples in all of the buckets are used and a median of
all of the data is used to make the estimate. For example, imagine
25 buckets each containing the full 100 entries. Those 2,500 samples
are sorted, and the estimate of the fee needed to confirm in the very
next block is the 50'th-highest-fee-entry in that sorted list; the
estimate of the fee needed to confirm in the next two blocks is the
150'th-highest-fee-entry, etc.

That algorithm has the nice property that estimates of how much fee
you need to pay to get confirmed in block N will always be greater
than or equal to the estimate for block N+1. It would clearly be wrong
to say "pay 11 uBTC and you'll get confirmed in 3 blocks, but pay
12 uBTC and it will take LONGER".

A single block will not contribute more than 10 entries to any one
bucket, so a single miner and a large block cannot overwhelm
the estimates.
2014-06-06 10:44:57 -04:00
Kamil Domanski 4b61a6a478 switch from boost int types to <stdint.h> 2014-05-13 11:41:59 +02:00
Cozz Lovan 7398f4a796 improve command-line options output 2014-03-25 13:09:20 +01:00
Wladimir J. van der Laan 5283410568 Remove unused includes of boost lexical_cast
We don't use lexical_cast anywhere, no need to include it.
2014-03-07 17:55:13 +01:00
Wladimir J. van der Laan 44235713ed Replace PrintException with PrintExceptionContinue + throw
Just a pet peeve.

(PrintException has exactly the same body as PrintExceptionContinue but
does a re-throw at the end. Move these re-throws to the call
site, this aids understanding what is going on as well as eliminates a
bit of code duplication in util.cpp)
2014-02-26 13:23:52 +01:00
Cozz Lovan a719903804 Fix bitcoin-cli exit status code 2014-02-26 13:12:47 +01:00