mirror of
https://github.com/dashpay/dash.git
synced 2024-12-29 13:59:06 +01:00
4aa197dbdb
fa4632c41714dfaa699bacc6a947d72668a4deef test: Move boost/stdlib includes last (MarcoFalke) fa488f131fd4f5bab0d01376c5a5013306f1abcd scripted-diff: Bump copyright headers (MarcoFalke) fac5c373006a9e4bcbb56843bb85f1aca4d87599 scripted-diff: Sort test includes (MarcoFalke) Pull request description: When writing tests, often includes need to be added or removed. Currently the list of includes is not sorted, so developers that write tests and have `clang-format` installed will either have an unrelated change (sorting) included in their commit or they will have to manually undo the sort. This pull preempts both issues by just sorting all includes in one commit. Please be aware that this is **NOT** a change to policy to enforce clang-format or any other developer guideline or process. Developers are free to use whatever tool they want, see also #18651. Edit: Also includes a commit to bump the copyright headers, so that the touched files don't need to be touched again for that. ACKs for top commit: practicalswift: ACK fa4632c41714dfaa699bacc6a947d72668a4deef jonatack: ACK fa4632c41714dfaa, light review and sanity checks with gcc build and clang fuzz build Tree-SHA512: 130a8d073a379ba556b1e64104d37c46b671425c0aef0ed725fd60156a95e8dc83fb6f0b5330b2f8152cf5daaf3983b4aca5e75812598f2626c39fd12b88b180
44 lines
2.0 KiB
C++
44 lines
2.0 KiB
C++
// Copyright (c) 2017-2020 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_RPC_RAWTRANSACTION_UTIL_H
|
|
#define BITCOIN_RPC_RAWTRANSACTION_UTIL_H
|
|
|
|
#include <map>
|
|
#include <string>
|
|
|
|
class FillableSigningProvider;
|
|
class UniValue;
|
|
struct CMutableTransaction;
|
|
class Coin;
|
|
class COutPoint;
|
|
class SigningProvider;
|
|
|
|
/**
|
|
* Sign a transaction with the given keystore and previous transactions
|
|
*
|
|
* @param mtx The transaction to-be-signed
|
|
* @param prevTxsUnival Array of previous txns outputs that tx depends on but may not yet be in the block chain
|
|
* @param keystore Temporary keystore containing signing keys
|
|
* @param coins Map of unspent outputs
|
|
* @param hashType The signature hash type
|
|
* @param result JSON object where signed transaction results accumulate
|
|
*/
|
|
void SignTransaction(CMutableTransaction& mtx, const SigningProvider* keystore, const std::map<COutPoint, Coin>& coins, const UniValue& hashType, UniValue& result);
|
|
void SignTransactionResultToJSON(CMutableTransaction& mtx, bool complete, const std::map<COutPoint, Coin>& coins, const std::map<int, std::string>& input_errors, UniValue& result);
|
|
|
|
/**
|
|
* Parse a prevtxs UniValue array and get the map of coins from it
|
|
*
|
|
* @param prevTxs Array of previous txns outputs that tx depends on but may not yet be in the block chain
|
|
* @param keystore A pointer to the temprorary keystore if there is one
|
|
* @param coins Map of unspent outputs - coins in mempool and current chain UTXO set, may be extended by previous txns outputs after call
|
|
*/
|
|
void ParsePrevouts(const UniValue& prevTxsUnival, FillableSigningProvider* keystore, std::map<COutPoint, Coin>& coins);
|
|
|
|
/** Create a transaction from univalue parameters */
|
|
CMutableTransaction ConstructTransaction(const UniValue& inputs_in, const UniValue& outputs_in, const UniValue& locktime);
|
|
|
|
#endif // BITCOIN_RPC_RAWTRANSACTION_UTIL_H
|