Matt Corallo
928c6811f2
Use "replaceable" instead of "optintorbf" in createrawtransaction.
...
To be consistent with other places (and add the missing named
args entry for it).
2017-07-05 18:11:19 -04:00
Wladimir J. van der Laan
c94b89e90d
Merge #9738 : gettxoutproof() should return consistent result
...
6294f32
gettxoutproof() should return consistent result (John Newbery)
Tree-SHA512: 1c36f78ea07a3bdde09e9494207b4372d54bcd94ed2d56e339e78281f6693e26a93e4c3123453d5c0f6e994d0069d5a1c806786c4af71864f87ea4841611c379
2017-06-14 15:48:52 +02:00
Pieter Wuille
1ad3d4e126
Merge #10502 : scripted-diff: Remove BOOST_FOREACH, Q_FOREACH and PAIRTYPE
...
1238f13cf
scripted-diff: Remove PAIRTYPE (Jorge Timón)
18dc3c396
scripted-diff: Remove Q_FOREACH (Jorge Timón)
7c00c2672
scripted-diff: Fully remove BOOST_FOREACH (Jorge Timón)
a5410ac5e
Small preparations for Q_FOREACH, PAIRTYPE and #include <boost/foreach.hpp> removal (Jorge Timón)
Tree-SHA512: d3ab4a173366402e7dcef31608977b757d4aa07abbbad2ee1bcbcfa311e994a4552f24e5a55272cb22c2dcf89a4b0495e02e9d9aceae4b08c0bab668f20e324c
2017-06-13 18:05:58 -07:00
Pieter Wuille
76f268b9bd
Merge #10521 : Limit variable scope
...
90593ed92
Limit variable scope (practicalswift)
Tree-SHA512: 4719e303688a31aefbe1d239e86b21dd3c2045524e08bd628c6ba0c6c2a97de14d04305b9beafe0b1dcde7229793e6663168953f192e88ed409be5c30fd2a9a9
2017-06-09 13:09:24 -07:00
Wladimir J. van der Laan
29f80cd230
Merge #10545 : Use list initialization (C++11) for maps/vectors instead of boost::assign::map_list_of/list_of
...
3fb81a8
Use list initialization (C++11) for maps/vectors instead of boost::assign::map_list_of/list_of (practicalswift)
Tree-SHA512: 63a9ac9ec5799472943dce1cd92a4b14e7f1fe12758a5fc4b1efceaf2c85a4ba71dad5ccc50813527f18b192e7714c076e2478ecd6ca0d452b24e88416f872f7
2017-06-08 20:26:40 +02:00
John Newbery
6294f3283a
gettxoutproof() should return consistent result
...
We can call gettxoutproof() with a list of transactions. Currently, if
the first transaction is unspent (and all other transactions are in the
same block), then the call will succeed. If the first transaction has
been spent, then the call will fail. The means that the following two
calls will return different results:
gettxoutproof(unspent_tx1, spent_tx1)
gettxoutproof(spent_tx1, unspent_tx1)
This commit makes behaviour independent of transaction ordering by looping
through all transactions provided and trying to find which block they're in.
This commit also increases the test coverage and tests more failure
cases for gettxoutproof()
2017-06-07 17:38:21 -04:00
practicalswift
3fb81a8480
Use list initialization (C++11) for maps/vectors instead of boost::assign::map_list_of/list_of
2017-06-06 21:29:16 +02:00
Luke Dashjr
9a5a1d7d45
RPC/rawtransaction: createrawtransaction: Check opt_into_rbf when provided with either value
2017-06-05 23:14:34 +00:00
Luke Dashjr
b005bf21a7
Introduce MAX_BIP125_RBF_SEQUENCE constant
2017-06-05 23:14:34 +00:00
Luke Dashjr
578ec80d4f
RPC: rawtransaction: Add RBF support for createrawtransaction
2017-06-05 23:09:01 +00:00
Jorge Timón
7c00c26726
scripted-diff: Fully remove BOOST_FOREACH
...
-BEGIN VERIFY SCRIPT-
sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
-END VERIFY SCRIPT-
2017-06-05 20:10:50 +02:00
practicalswift
90593ed92c
Limit variable scope
2017-06-05 00:52:36 +02:00
Pieter Wuille
589827975f
scripted-diff: various renames for per-utxo consistency
...
Thanks to John Newberry for pointing these out.
-BEGIN VERIFY SCRIPT-
sed -i 's/\<GetCoins\>/GetCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<HaveCoins\>/HaveCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<HaveCoinsInCache\>/HaveCoinInCache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<IsPruned\>/IsSpent/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<FetchCoins\>/FetchCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<CoinsEntry\>/CoinEntry/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<vHashTxnToUncache\>/coins_to_uncache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<vHashTxToUncache\>/coins_to_uncache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<fHadTxInCache\>/had_coin_in_cache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<coinbaseids\>/coinbase_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<disconnectedids\>/disconnected_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<duplicateids\>/duplicate_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<oldcoins\>/old_coin/g' src/test/coins_tests.cpp
sed -i 's/\<origcoins\>/orig_coin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
-END VERIFY SCRIPT-
2017-06-01 13:15:25 -07:00
Pieter Wuille
5083079688
Switch CCoinsView and chainstate db from per-txid to per-txout
...
This patch makes several related changes:
* Changes the CCoinsView virtual methods (GetCoins, HaveCoins, ...)
to be COutPoint/Coin-based rather than txid/CCoins-based.
* Changes the chainstate db to a new incompatible format that is also
COutPoint/Coin based.
* Implements reconstruction code for hash_serialized_2.
* Adapts the coins_tests unit tests (thanks to Russell Yanofsky).
A side effect of the new CCoinsView model is that we can no longer
use the (unreliable) test for transaction outputs in the UTXO set
to determine whether we already have a particular transaction.
2017-06-01 12:59:38 -07:00
Pieter Wuille
f68cdfe92b
Switch from per-tx to per-txout CCoinsViewCache methods in some places
2017-06-01 11:56:06 -07:00
Gregory Sanders
9f7341b078
Add witness data output to TxInError messages
2017-05-17 13:30:42 -04:00
jonnynewbs
0ff9320bf5
refactor TxToJSON() and ScriptPubKeyToJSON()
2017-04-28 10:01:56 -04:00
MarcoFalke
fa55853219
rpc: Rename first named arg of createrawtransaction
2017-03-26 12:08:44 +02:00
James Evans
05a9f22358
Trivial: Fix typo in help getrawtransaction RPC
2017-03-20 05:19:41 -03:00
Karl-Johan Alm
f3c264e9a6
Refactor: Remove using namespace <xxx> from rpc/
2017-03-08 08:07:55 -08:00
Wladimir J. van der Laan
30ff3a2fc9
Merge #9602 : Remove coin age priority and free transactions - implementation
...
b421e6d
Update example bitcoin.conf (Alex Morcos)
7d4e950
Allow setting minrelaytxfee to 0 (Alex Morcos)
359e8a0
[cleanup] Remove coin age priority completely. (Alex Morcos)
f9b9371
[rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos)
49be7e1
[rpc] Remove priority information from mempool RPC calls (Alex Morcos)
0315888
[test] Remove priority from tests (Alex Morcos)
f838005
No longer allow "free" transactions (Alex Morcos)
ad727f4
[rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos)
fe282ac
[cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos)
400b151
[debug] Change -printpriority option (Alex Morcos)
272b25a
[mining] Remove -blockprioritysize. (Alex Morcos)
12839cd
[rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos)
ddf58c7
wallet: Remove sendfree (MarcoFalke)
Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782
2017-03-07 19:30:23 +01:00
Luke Dashjr
a4356328e0
Move wallet RPC declarations to rpcwallet.h
2017-02-27 20:45:18 +00:00
Luke Dashjr
bf8a04a165
Reformat touched lines with C++11
2017-02-27 20:45:18 +00:00
Luke Dashjr
d77ad6d416
RPC: Do all wallet access through new GetWalletForJSONRPCRequest
2017-02-27 20:45:17 +00:00
Luke Dashjr
eca550f250
RPC/Wallet: Pass CWallet as pointer to helper functions
2017-02-27 20:45:17 +00:00
Alex Morcos
ad727f4eaf
[rpc] sendrawtransaction no longer bypasses minRelayTxFee
...
The prioritisetransaction API can always be used if a transaction needs to be submitted that bypasses minRelayTxFee.
2017-02-27 11:23:51 -05:00
John Newbery
9949ebfa6a
[Trivial] Remove incorrect help message from gettxoutproof()
2017-02-07 11:21:14 -05:00
Matt Corallo
922bea90c2
Better handle invalid parameters to signrawtransaction
...
This silently skips trying to merge signatures from inputs which
do not exist from transactions provided to signrawtransaction,
instead of hitting an assert.
2017-02-02 17:32:27 -05:00
Wladimir J. van der Laan
9c9af5ab2d
Merge #9499 : Use recent-rejects, orphans, and recently-replaced txn for compact-block-reconstruction
...
c594580
Add braces around AddToCompactExtraTransactions (Matt Corallo)
1ccfe9b
Clarify comment about mempool/extra conflicts (Matt Corallo)
fac4c78
Make PartiallyDownloadedBlock::InitData's second param const (Matt Corallo)
b55b416
Add extra_count lower bound to compact reconstruction debug print (Matt Corallo)
863edb4
Consider all (<100k memusage) txn for compact-block-extra-txn cache (Matt Corallo)
7f8c8ca
Consider all orphan txn for compact-block-extra-txn cache (Matt Corallo)
93380c5
Use replaced transactions in compact block reconstruction (Matt Corallo)
1531652
Keep shared_ptrs to recently-replaced txn for compact blocks (Matt Corallo)
edded80
Make ATMP optionally return the CTransactionRefs it replaced (Matt Corallo)
c735540
Move ORPHAN constants from validation.h to net_processing.h (Matt Corallo)
2017-01-19 09:03:46 +01:00
Pieter Wuille
db904db7e6
Deprecate non-txindex getrawtransaction and better warning
2017-01-11 15:34:13 -08:00
John Newbery
4e7e2e16e4
Update RPC argument names
2017-01-10 12:04:54 +01:00
Matt Corallo
edded808fc
Make ATMP optionally return the CTransactionRefs it replaced
2017-01-09 14:15:18 -05:00
Wladimir J. van der Laan
9adb4e1a59
rpc: Argument name consistency
...
The meaning is clear from the context, and we're inconsistent here.
Also save typing when using named arguments.
- `bitcoinaddress` -> `address`
- `bitcoinprivkey` -> `privkey`
- `bitcoinpubkey` -> `pubkey`
2017-01-05 11:30:20 +01:00
Wladimir J. van der Laan
8d713f761b
rpc: Named arguments for rawtransaction calls
2017-01-05 11:30:20 +01:00
Wladimir J. van der Laan
869781c51c
Merge #9283 : A few more CTransactionRef optimizations
...
91335ba
Remove unused MakeTransactionRef overloads (Pieter Wuille)
6713f0f
Make FillBlock consume txn_available to avoid shared_ptr copies (Pieter Wuille)
62607d7
Convert COrphanTx to keep a CTransactionRef (Pieter Wuille)
c44e4c4
Make AcceptToMemoryPool take CTransactionRef (Pieter Wuille)
2017-01-04 12:23:10 +01:00
isle2983
27765b6403
Increment MIT Licence copyright header year on files modified in 2016
...
Edited via:
$ contrib/devtools/copyright_header.py update .
2016-12-31 11:01:21 -07:00
Anditto Heristyo
afe5b3f553
Added missing colons in when running help command
2016-12-22 13:26:03 +09:00
Pieter Wuille
c44e4c467c
Make AcceptToMemoryPool take CTransactionRef
2016-12-21 18:18:23 -08:00
Wladimir J. van der Laan
e8cfe1ee2d
Merge #8589 : Inline CTxInWitness inside CTxIn
...
f6fb7ac
Move CTxInWitness inside CTxIn (Pieter Wuille)
2016-12-21 14:04:06 +01:00
Gregory Sanders
bc7ff8db99
Add option to return non-segwit serialization via rpc
2016-12-05 07:43:22 -05:00
Pieter Wuille
f6fb7acda4
Move CTxInWitness inside CTxIn
2016-12-04 23:47:12 -08:00
Pieter Wuille
42fd8dee30
Make DecodeHexTx return a CMutableTransaction
2016-12-02 18:28:22 -08:00
Pieter Wuille
a1883536b4
Switch GetTransaction to returning a CTransactionRef
2016-12-02 18:28:22 -08:00
Matt Corallo
76faa3cdfe
Rename the remaining main.{h,cpp} to validation.{h,cpp}
2016-12-02 09:42:51 -08:00
Wladimir J. van der Laan
4d8558a287
Merge #9025 : getrawtransaction should take a bool for verbose
...
240189b
add testcases for getrawtransaction (John Newbery)
ce2bb23
getrawtransaction should take a bool for verbose (jnewbery)
2016-11-23 07:13:46 +01:00
jnewbery
ce2bb23aa5
getrawtransaction should take a bool for verbose
2016-11-22 14:37:33 +00:00
Pieter Wuille
1662b437b3
Make CBlock::vtx a vector of shared_ptr<CTransaction>
2016-11-19 17:51:09 -08:00
Jonas Schnelli
69d1c25768
[RPC] Give RPC commands more information about the RPC request
2016-10-19 14:42:08 +02:00
Wladimir J. van der Laan
e10af96cf4
Merge #8287 : [wallet] Set fLimitFree = true
...
fa8b02d
[rpc] rawtx: Prepare fLimitFree to make it an option (MarcoFalke)
fa28bfa
[wallet] Set fLimitFree = true (MarcoFalke)
2016-10-18 21:05:07 +02:00
jnewbery
d51f182461
Don't return the address of a P2SH of a P2SH.
2016-10-05 08:58:18 -04:00