Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <base58.h>
#include <clientversion.h>
#include <coins.h>
#include <consensus/consensus.h>
#include <core_io.h>
#include <keystore.h>
#include <policy/policy.h>
#include <primitives/transaction.h>
#include <script/script.h>
#include <script/sign.h>
#include <univalue.h>
#include <util.h>
#include <utilmoneystr.h>
#include <utilstrencodings.h>
#include <memory>
#include <stdio.h>
#include <boost/algorithm/string.hpp>
#include <stacktraces.h>
Go to the source code of this file.
Classes | |
class | Secp256k1Init |
Functions | |
static int | AppInitRawTx (int argc, char *argv[]) |
static void | RegisterSetJson (const std::string &key, const std::string &rawJson) |
static void | RegisterSet (const std::string &strInput) |
static void | RegisterLoad (const std::string &strInput) |
static CAmount | ExtractAndValidateValue (const std::string &strValue) |
static void | MutateTxVersion (CMutableTransaction &tx, const std::string &cmdVal) |
static void | MutateTxLocktime (CMutableTransaction &tx, const std::string &cmdVal) |
static void | MutateTxAddInput (CMutableTransaction &tx, const std::string &strInput) |
static void | MutateTxAddOutAddr (CMutableTransaction &tx, const std::string &strInput) |
static void | MutateTxAddOutPubKey (CMutableTransaction &tx, const std::string &strInput) |
static void | MutateTxAddOutMultiSig (CMutableTransaction &tx, const std::string &strInput) |
static void | MutateTxAddOutData (CMutableTransaction &tx, const std::string &strInput) |
static void | MutateTxAddOutScript (CMutableTransaction &tx, const std::string &strInput) |
static void | MutateTxDelInput (CMutableTransaction &tx, const std::string &strInIdx) |
static void | MutateTxDelOutput (CMutableTransaction &tx, const std::string &strOutIdx) |
static bool | findSighashFlags (int &flags, const std::string &flagStr) |
static CAmount | AmountFromValue (const UniValue &value) |
static void | MutateTxSign (CMutableTransaction &tx, const std::string &flagStr) |
static void | MutateTx (CMutableTransaction &tx, const std::string &command, const std::string &commandVal) |
static void | OutputTxJSON (const CTransaction &tx) |
static void | OutputTxHash (const CTransaction &tx) |
static void | OutputTxHex (const CTransaction &tx) |
static void | OutputTx (const CTransaction &tx) |
static std::string | readStdin () |
static int | CommandLineRawTx (int argc, char *argv[]) |
int | main (int argc, char *argv[]) |
Variables | |
static bool | fCreateBlank |
static std::map< std::string, UniValue > | registers |
static const int | CONTINUE_EXECUTION =-1 |
static const unsigned int | N_SIGHASH_OPTS = 6 |
struct { | |
const char * flagStr | |
int flags | |
} | sighashOptions [N_SIGHASH_OPTS] |
Function Documentation
◆ AmountFromValue()
Definition at line 486 of file dash-tx.cpp.
References UniValue::getValStr(), UniValue::isNum(), UniValue::isStr(), MoneyRange(), and ParseFixedPoint().
Referenced by createrawtransaction(), fundrawtransaction(), listaddressbalances(), listunspent(), movecmd(), MutateTxSign(), sendfrom(), sendmany(), sendtoaddress(), settxfee(), and signrawtransaction().
◆ AppInitRawTx()
|
static |
Definition at line 39 of file dash-tx.cpp.
References _(), AppendParamsHelpMessages(), CONTINUE_EXECUTION, fCreateBlank, FormatFullVersion(), gArgs, ArgsManager::GetArg(), ArgsManager::GetBoolArg(), ArgsManager::GetChainName(), GetCrashInfoStrFromSerializedStr(), HelpMessageGroup(), HelpMessageOpt(), ArgsManager::IsArgSet(), ArgsManager::ParseParameters(), SelectParams(), and strprintf.
Referenced by main().
◆ CommandLineRawTx()
|
static |
Definition at line 738 of file dash-tx.cpp.
References DecodeHexTx(), fCreateBlank, IsSwitchChar(), MutateTx(), OutputTx(), PrintExceptionContinue(), and readStdin().
Referenced by main().
◆ ExtractAndValidateValue()
|
static |
Definition at line 183 of file dash-tx.cpp.
References ParseMoney().
Referenced by MutateTxAddOutAddr(), MutateTxAddOutData(), MutateTxAddOutMultiSig(), MutateTxAddOutPubKey(), and MutateTxAddOutScript().
◆ findSighashFlags()
|
static |
Definition at line 472 of file dash-tx.cpp.
References flags, flagStr, N_SIGHASH_OPTS, and sighashOptions.
Referenced by MutateTxSign().
◆ main()
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 805 of file dash-tx.cpp.
References AppInitRawTx(), CommandLineRawTx(), CONTINUE_EXECUTION, PrintExceptionContinue(), RegisterPrettySignalHandlers(), RegisterPrettyTerminateHander(), and SetupEnvironment().
◆ MutateTx()
|
static |
Definition at line 640 of file dash-tx.cpp.
References MutateTxAddInput(), MutateTxAddOutAddr(), MutateTxAddOutData(), MutateTxAddOutMultiSig(), MutateTxAddOutPubKey(), MutateTxAddOutScript(), MutateTxDelInput(), MutateTxDelOutput(), MutateTxLocktime(), MutateTxSign(), MutateTxVersion(), RegisterLoad(), and RegisterSet().
Referenced by CommandLineRawTx().
◆ MutateTxAddInput()
|
static |
Definition at line 209 of file dash-tx.cpp.
References atoi(), IsHex(), MaxBlockSize(), uint256S(), and CMutableTransaction::vin.
Referenced by MutateTx().
◆ MutateTxAddOutAddr()
|
static |
Definition at line 243 of file dash-tx.cpp.
References DecodeDestination(), ExtractAndValidateValue(), GetScriptForDestination(), IsValidDestination(), and CMutableTransaction::vout.
Referenced by MutateTx().
◆ MutateTxAddOutData()
|
static |
Definition at line 366 of file dash-tx.cpp.
References ExtractAndValidateValue(), IsHex(), OP_RETURN, ParseHex(), and CMutableTransaction::vout.
Referenced by MutateTx().
◆ MutateTxAddOutMultiSig()
|
static |
Definition at line 303 of file dash-tx.cpp.
References ExtractAndValidateValue(), flags, GetScriptForDestination(), GetScriptForMultisig(), CPubKey::IsFullyValid(), MAX_SCRIPT_ELEMENT_SIZE, ParseHex(), prevector< N, T, Size, Diff >::size(), strprintf, and CMutableTransaction::vout.
Referenced by MutateTx().
◆ MutateTxAddOutPubKey()
|
static |
Definition at line 268 of file dash-tx.cpp.
References ExtractAndValidateValue(), flags, GetScriptForDestination(), GetScriptForRawPubKey(), CPubKey::IsFullyValid(), ParseHex(), and CMutableTransaction::vout.
Referenced by MutateTx().
◆ MutateTxAddOutScript()
|
static |
Definition at line 393 of file dash-tx.cpp.
References ExtractAndValidateValue(), flags, GetScriptForDestination(), MAX_SCRIPT_ELEMENT_SIZE, MAX_SCRIPT_SIZE, ParseScript(), prevector< N, T, Size, Diff >::size(), strprintf, and CMutableTransaction::vout.
Referenced by MutateTx().
◆ MutateTxDelInput()
|
static |
Definition at line 433 of file dash-tx.cpp.
References atoi(), and CMutableTransaction::vin.
Referenced by MutateTx().
◆ MutateTxDelOutput()
|
static |
Definition at line 446 of file dash-tx.cpp.
References atoi(), and CMutableTransaction::vout.
Referenced by MutateTx().
◆ MutateTxLocktime()
|
static |
Definition at line 200 of file dash-tx.cpp.
References atoi64(), and CMutableTransaction::nLockTime.
Referenced by MutateTx().
◆ MutateTxSign()
|
static |
Definition at line 498 of file dash-tx.cpp.
References CCoinsViewCache::AccessCoin(), CCoinsViewCache::AddCoin(), CBasicKeyStore::AddCScript(), CKeyStore::AddKey(), AmountFromValue(), atoi(), UniValue::checkObject(), CombineSignatures(), DataFromTransaction(), UniValue::exists(), findSighashFlags(), flagStr, CBitcoinSecret::GetKey(), UniValue::isObject(), Coin::IsSpent(), Coin::nHeight, CTxOut::nValue, Coin::out, ParseHashUV(), ParseHexUV(), CTxIn::prevout, ProduceSignature(), registers, CTxOut::scriptPubKey, CTxIn::scriptSig, ScriptToAsmStr(), CBitcoinSecret::SetString(), SIGHASH_ALL, SIGHASH_ANYONECANPAY, SIGHASH_SINGLE, UniValue::size(), STANDARD_SCRIPT_VERIFY_FLAGS, UpdateTransaction(), VerifyScript(), CMutableTransaction::vin, UniValue::VNUM, CMutableTransaction::vout, and UniValue::VSTR.
Referenced by MutateTx().
◆ MutateTxVersion()
|
static |
Definition at line 191 of file dash-tx.cpp.
References atoi64(), CTransaction::MAX_STANDARD_VERSION, and CMutableTransaction::nVersion.
Referenced by MutateTx().
◆ OutputTx()
|
static |
Definition at line 708 of file dash-tx.cpp.
References gArgs, ArgsManager::GetBoolArg(), OutputTxHash(), OutputTxHex(), and OutputTxJSON().
Referenced by CommandLineRawTx().
◆ OutputTxHash()
|
static |
Definition at line 694 of file dash-tx.cpp.
References CTransaction::GetHash(), and base_blob< BITS >::GetHex().
Referenced by OutputTx().
◆ OutputTxHex()
|
static |
◆ OutputTxJSON()
|
static |
Definition at line 685 of file dash-tx.cpp.
References TxToUniv(), UniValue::VOBJ, and UniValue::write().
Referenced by OutputTx().
◆ readStdin()
|
static |
Definition at line 718 of file dash-tx.cpp.
Referenced by CommandLineRawTx().
◆ RegisterLoad()
|
static |
Definition at line 142 of file dash-tx.cpp.
References error(), fsbridge::fopen(), and RegisterSetJson().
Referenced by MutateTx().
◆ RegisterSet()
|
static |
◆ RegisterSetJson()
|
static |
Definition at line 116 of file dash-tx.cpp.
References UniValue::read(), and registers.
Referenced by RegisterLoad(), and RegisterSet().
Variable Documentation
◆ CONTINUE_EXECUTION
|
static |
Definition at line 33 of file dash-tx.cpp.
Referenced by AppInitRawTx(), and main().
◆ fCreateBlank
|
static |
Definition at line 31 of file dash-tx.cpp.
Referenced by AppInitRawTx(), and CommandLineRawTx().
◆ flags
int flags |
Definition at line 462 of file dash-tx.cpp.
Referenced by CConnman::Bind(), CalculateSequenceLocks(), CheckFinalTx(), CheckInputs(), CheckInputsFromMempoolAndCache(), CheckPubKeyEncoding(), CheckSequenceLocks(), CheckSignatureEncoding(), CChainState::ConnectBlock(), dashconsensus_verify_script(), EvalScript(), findSighashFlags(), GetBlockScriptFlags(), CConnman::GetNodeCount(), ClientModel::getNumConnections(), GetTransactionSigOpCount(), MutateTxAddOutMultiSig(), MutateTxAddOutPubKey(), MutateTxAddOutScript(), CTxMemPool::removeForReorg(), BerkeleyEnvironment::Salvage(), secp256k1_context_create(), secp256k1_ec_pubkey_serialize(), SequenceLocks(), BerkeleyEnvironment::TxnBegin(), verify_flags(), and VerifyScript().
◆ flagStr
const char* flagStr |
Definition at line 461 of file dash-tx.cpp.
Referenced by findSighashFlags(), and MutateTxSign().
◆ N_SIGHASH_OPTS
|
static |
Definition at line 459 of file dash-tx.cpp.
Referenced by findSighashFlags().
◆ registers
|
static |
Definition at line 32 of file dash-tx.cpp.
Referenced by MutateTxSign(), and RegisterSetJson().
◆ sighashOptions
const { ... } sighashOptions[N_SIGHASH_OPTS] |
Referenced by findSighashFlags().