MCPcopy Create free account
hub / github.com/ElementsProject/elements / HandleATMPError

Function HandleATMPError

src/node/transaction.cpp:20–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19namespace node {
20static TransactionError HandleATMPError(const TxValidationState& state, std::string& err_string_out)
21{
22 err_string_out = state.ToString();
23 if (state.IsInvalid()) {
24 if (state.GetResult() == TxValidationResult::TX_MISSING_INPUTS) {
25 return TransactionError::MISSING_INPUTS;
26 }
27 return TransactionError::MEMPOOL_REJECTED;
28 } else {
29 return TransactionError::MEMPOOL_ERROR;
30 }
31}
32
33TransactionError BroadcastTransaction(NodeContext& node, const CTransactionRef tx, std::string& err_string, const CAmount& max_tx_fee, bool relay, bool wait_callback)
34{

Callers 1

BroadcastTransactionFunction · 0.85

Calls 3

IsInvalidMethod · 0.80
GetResultMethod · 0.80
ToStringMethod · 0.45

Tested by

no test coverage detected