Andrew Chow
6b4f231f5f
Move transaction combining from signrawtransaction to new RPC
...
Create a combinerawtransaction RPC which accepts a json array of hex raw
transactions to combine them into one transaction. Signrawtransaction is changed
to no longer combine transactions and only accept one transaction at a time.
7 years ago
Gregory Sanders
4dc1915bce
check for null values in rpc args and handle appropriately
7 years ago
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).
7 years ago
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()
8 years ago
practicalswift
3fb81a8480
Use list initialization (C++11) for maps/vectors instead of boost::assign::map_list_of/list_of
8 years ago
Luke Dashjr
9a5a1d7d45
RPC/rawtransaction: createrawtransaction: Check opt_into_rbf when provided with either value
8 years ago
Luke Dashjr
b005bf21a7
Introduce MAX_BIP125_RBF_SEQUENCE constant
8 years ago
Luke Dashjr
578ec80d4f
RPC: rawtransaction: Add RBF support for createrawtransaction
8 years ago
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-
8 years ago
practicalswift
90593ed92c
Limit variable scope
8 years ago
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-
8 years ago
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.
8 years ago
Pieter Wuille
f68cdfe92b
Switch from per-tx to per-txout CCoinsViewCache methods in some places
8 years ago
Gregory Sanders
9f7341b078
Add witness data output to TxInError messages
8 years ago
jonnynewbs
0ff9320bf5
refactor TxToJSON() and ScriptPubKeyToJSON()
8 years ago
MarcoFalke
fa55853219
rpc: Rename first named arg of createrawtransaction
8 years ago
James Evans
05a9f22358
Trivial: Fix typo in help getrawtransaction RPC
8 years ago
Karl-Johan Alm
f3c264e9a6
Refactor: Remove using namespace <xxx> from rpc/
8 years ago
Luke Dashjr
a4356328e0
Move wallet RPC declarations to rpcwallet.h
8 years ago
Luke Dashjr
bf8a04a165
Reformat touched lines with C++11
8 years ago
Luke Dashjr
d77ad6d416
RPC: Do all wallet access through new GetWalletForJSONRPCRequest
8 years ago
Luke Dashjr
eca550f250
RPC/Wallet: Pass CWallet as pointer to helper functions
8 years ago
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.
8 years ago
John Newbery
9949ebfa6a
[Trivial] Remove incorrect help message from gettxoutproof()
8 years ago
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.
8 years ago
Pieter Wuille
db904db7e6
Deprecate non-txindex getrawtransaction and better warning
8 years ago
John Newbery
4e7e2e16e4
Update RPC argument names
8 years ago
Matt Corallo
edded808fc
Make ATMP optionally return the CTransactionRefs it replaced
8 years ago
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`
8 years ago
Wladimir J. van der Laan
8d713f761b
rpc: Named arguments for rawtransaction calls
8 years ago
isle2983
27765b6403
Increment MIT Licence copyright header year on files modified in 2016
...
Edited via:
$ contrib/devtools/copyright_header.py update .
8 years ago
Anditto Heristyo
afe5b3f553
Added missing colons in when running help command
8 years ago
Pieter Wuille
c44e4c467c
Make AcceptToMemoryPool take CTransactionRef
8 years ago
Gregory Sanders
bc7ff8db99
Add option to return non-segwit serialization via rpc
8 years ago
Pieter Wuille
f6fb7acda4
Move CTxInWitness inside CTxIn
8 years ago
Pieter Wuille
42fd8dee30
Make DecodeHexTx return a CMutableTransaction
8 years ago
Pieter Wuille
a1883536b4
Switch GetTransaction to returning a CTransactionRef
8 years ago
Matt Corallo
76faa3cdfe
Rename the remaining main.{h,cpp} to validation.{h,cpp}
8 years ago
jnewbery
ce2bb23aa5
getrawtransaction should take a bool for verbose
8 years ago
Pieter Wuille
1662b437b3
Make CBlock::vtx a vector of shared_ptr<CTransaction>
8 years ago
Jonas Schnelli
69d1c25768
[RPC] Give RPC commands more information about the RPC request
8 years ago
jnewbery
d51f182461
Don't return the address of a P2SH of a P2SH.
8 years ago
Jeremy Rubin
d1a2295f0d
Made the ForEachNode* functions in src/net.cpp more pragmatic and self documenting
8 years ago
Cory Fields
53347f0cb9
net: create generic functor accessors and move vNodes to CConnman
8 years ago
MarcoFalke
fa8b02d36d
[rpc] rawtx: Prepare fLimitFree to make it an option
8 years ago
Pavel Janík
de1bbe3b78
Do not shadow global RPC table variable (tableRPC)
8 years ago
NicolasDorier
745eb678ef
[RPC] signrawtransaction can sign P2WSH
9 years ago
Pieter Wuille
605e8473a7
BIP143: Signing logic
9 years ago
Pieter Wuille
2b1f6f9ccf
BIP141: Other consensus critical limits, and BIP145
...
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
9 years ago
Johnson Lau
7c4bf779e8
[RPC] Return witness data in blockchain RPCs
...
Includes RPC field name changes by Luke-jr.
9 years ago