aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/rawtransaction_util.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace consensus values with Dogecoin equivalentsRoss Nicoll2021-06-021-1/+1
| | | | | | | * Replace chain parameters with Dogecoin values * Update maximum coins to match Dogecoin * Disable version 2 block requirement * Update coinbase maturity to match Dogecoin
* Merge #19956: rpc: Improve invalid vout value rpc error messagefanquake2020-10-031-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f471a3be00c2b6433b8c258b716982c0539da13f scripted diff: Improve invalid vout value rpc error message (Nima Yazdanmehr) Pull request description: Since the `vout` value can start at `0`, the error message for *negative* values can be improved to something like: `vout cannot be negative`. ACKs for top commit: fanquake: ACK f471a3be00c2b6433b8c258b716982c0539da13f promag: Code review ACK f471a3be00c2b6433b8c258b716982c0539da13f. Tree-SHA512: fbdee3d0ddd5b58eb93934a1217b44e125a9ad39e672b1f35c7609c6c5fcf45ae1b731d3d6135b7225d98792dbfc34a50907b8c41274a5b029d7b5c59f886560
| * scripted diff: Improve invalid vout value rpc error messageNima Yazdanmehr2020-09-301-2/+2
| | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- r() { sed -i 's/vout must be positive/vout cannot be negative/g' $1 } r $(git grep -l 'vout must be positive') -END VERIFY SCRIPT-
* | rpc: add brackets to ConstructTransactionSjors Provoost2020-09-171-3/+5
|/
* [rpc] walletcreatefundedpsbt: allow inputs to be nullSjors Provoost2020-09-071-3/+8
| | | | This is of neglible use here, but it allows new RPC methods to take outputs as their first argument and make inputs optional.
* refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o)Wladimir J. van der Laan2020-06-241-2/+2
| | | | | HexStr can be called with anything that bas `begin()` and `end()` functions, so clean up the redundant calls.
* scripted-diff: Bump copyright headersMarcoFalke2020-04-161-1/+1
| | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* Correctly compute redeemScript from witnessScript for signrawtransactionAndrew Chow2020-03-311-1/+1
| | | | | | | | | | | ParsePrevouts uses GetScriptForWitness on the given witnessScript to find the corresponding redeemScript. This is incorrect when the witnessScript is either a P2PK or P2PKH script as it returns the corresponding P2WPK script instead of turning the witnessScript into a P2WSH script. Instead this should make the script a WitnessV0ScriptHash destination and get the script for that. Test cases are also added.
* Refactor rawtransaction's SignTransaction into generic SignTransaction functionAndrew Chow2020-03-081-42/+14
|
* Accumulate result UniValue in SignTransactionAndrew Chow2019-11-181-4/+4
| | | | | | SignTransaction will be called multiple times in the future. Pass it a result UniValue so that it can accumulate the results of multiple SignTransaction passes.
* doc: Fix doxygen comment for SignTransaction in rpc/rawtransaction_utilMarcoFalke2019-09-191-1/+1
|
* signrawtransaction*: improve error for partial signingAnthony Towns2019-09-101-0/+3
| | | | Thanks to Danial Jaffy (tipu) for reporting this issue.
* signrawtransactionwithkey: better error messages for bad ↵Anthony Towns2019-09-101-16/+57
| | | | | | | | | | redeemScript/witnessScript This adds checks to ensure the redeemScript/witnessScript actually correspond to the provided scriptPubKey, and, if both are provided, that they are sensibly related to each other. Thanks to github user passionofvc for raising this issue.
* Refactor rawtransaction_util's SignTransaction to have previous tx parsing ↵Andrew Chow2019-09-031-3/+5
| | | | be separate
* [rpc] walletcreatefundedpsbt: use wallet default RBFSjors Provoost2019-07-271-5/+3
|
* Merge #16227: Refactor CWallet's inheritance chainWladimir J. van der Laan2019-07-111-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 93ce4a0b6fb54efb1f424a71dfc09cc33307e5b9 Move WatchOnly stuff from SigningProvider to CWallet (Andrew Chow) 8f5b81e6edae9cb22559545de63f391d97c15701 Remove CCryptoKeyStore and move all of it's functionality into CWallet (Andrew Chow) 37a79a4fccbf6cd65a933594e24e59d36e674653 Move various SigningProviders to signingprovider.{cpp,h} (Andrew Chow) 16f8096e911e4d59292240a17e2d4004f0500b9e Move KeyOriginInfo to its own header file (Andrew Chow) d9becff4e13da8e182631baa79b9794c03d44434 scripted-diff: rename CBasicKeyStore to FillableSigningProvider (Andrew Chow) a913e3f2fbeb1352fc66f334d4f5f7332ea89ad7 Move HaveKey static function from keystore to rpcwallet where it is used (Andrew Chow) c7797ec65544bd23a2e571b2892e1bf512f2a485 Remove CKeyStore and squash into CBasicKeyStore (Andrew Chow) 1b699a5083b435c2b79f3951f94ac9f967d24f6c Add HaveKey and HaveCScript to SigningProvider (Andrew Chow) Pull request description: This PR compresses the `CWallet` chain of inheritance from 5 classes to 3 classes. `CBasicKeyStore` is renamed to `FillableSigningProvider` and some parts of it (the watchonly parts) are moved into `CWallet`. `CKeyStore` and `CCrypoKeyStore` are completely removed. `CKeyStore`'s `Have*` functions are moved into `SigningProvider` and the `Add*` moved into `FillableSigningProvider`, thus allowing it to go away entirely. `CCryptoKeyStore`'s functionality is moved into `CWallet`. The new inheritance chain is: ``` SigningProvider -> FillableSigningProvider -> CWallet ``` `SigningProvider` now is the class the provides keys and scripts and indicates whether keys and scripts are present. `FillableSigningProvider` allows keys and scripts to be added to the signing provider via `Add*` functions. `CWallet` handles all of the watchonly stuff (`AddWatchOnly`, `HaveWatchOnly`, `RemoveWatchOnly` which were previously in `CKeyStore`) and key encryption (previously in `CCryptoKeyStore`). Implements the 2nd [prerequisite](https://github.com/bitcoin-core/bitcoin-devwiki/wiki/Wallet-Class-Structure-Changes#cwallet-subclass-stack) from the wallet restructure. ACKs for top commit: Sjors: re-ACK 93ce4a0; it keeps `EncryptSecret`, `DecryptSecret` and `DecryptKey` in `wallet/crypter.cpp`, but makes them not static. It improves alphabetical includes, reorders some function definitions, fixes commit message, brings back lost code comment. instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/16227/commits/93ce4a0b6fb54efb1f424a71dfc09cc33307e5b9 Tree-SHA512: 393dfd0623ad2dac38395eb89b862424318d6072f0b7083c92a0d207fd032c48b284f5f2cb13bc492f34557de350c5fee925da02e47daf011c5c6930a721b6d3
| * Move various SigningProviders to signingprovider.{cpp,h}Andrew Chow2019-07-091-1/+2
| | | | | | | | | | | | | | | | | | Moves all of the various SigningProviders out of sign.{cpp,h} and keystore.{cpp,h}. As such, keystore.{cpp,h} is also removed. Includes and the Makefile are updated to reflect this. Includes were largely changed using: git grep -l "keystore.h" | xargs sed -i -e 's;keystore.h;script/signingprovider.h;g'
| * scripted-diff: rename CBasicKeyStore to FillableSigningProviderAndrew Chow2019-07-091-1/+1
| | | | | | | | | | | | -BEGIN VERIFY SCRIPT- git grep -l "CBasicKeyStore" | xargs sed -i -e 's/CBasicKeyStore/FillableSigningProvider/g' -END VERIFY SCRIPT-
* | rpc: migrate JSONRPCRequest functionality into request.cppKarl-Johan Alm2019-07-051-1/+1
|/
* signrawtransactionwithkey: report error when missing ↵Anthony Towns2019-06-251-0/+3
| | | | redeemScript/witnessScript param
* Make reasoning about dependencies easier by not including unused dependenciespracticalswift2019-06-021-1/+0
|
* rpc: Remove dependency on interfaces::Chain in SignTransactionAntoine Riard2019-04-171-11/+1
| | | | Comment SignTransaction utility
* [build] Add several util unitsJohn Newbery2019-04-091-1/+1
| | | | | | | | | | | | Adds the following util units and adds them to libbitcoin_util: - `util/url.cpp` takes `urlDecode` from `httpserver.cpp` - `util/error.cpp` takes `TransactionErrorString` from `node/transaction.cpp` and `AmountHighWarn` and `AmountErrMsg` from `ui_interface.cpp` - `util/fees.cpp` takes `StringForFeeReason` and `FeeModeFromString` from `policy/fees.cpp` - `util/rbf.cpp` takes `SignalsOptInRBF` from `policy/rbf.cpp` - 'util/validation.cpp` takes `FormatStateMessage` and `strMessageMagic` from 'validation.cpp`
* [build] Move rpc rawtransaction util functions to rpc/rawtransaction_util.cppJohn Newbery2019-04-091-0/+293
rpc/rawtransaction.cpp moves to libbitcoin_server since it should not be accessed by non-node libraries. The utility following utility methods move to their own unit rpc/rawtransaction_util since they need to be accessed by non-node libraries: - `ConstructTransaction` - `TxInErrorToJSON` - `SignTransaction`