Skip to content

Commit

Permalink
Return complete reason for package submission failure
Browse files Browse the repository at this point in the history
To be used for better ephemeral anchor tests
  • Loading branch information
instagibbs committed Nov 9, 2023
1 parent 5174cf5 commit 1247e21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpc/mempool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ static RPCHelpMan submitpackage()
auto it = package_result.m_tx_results.find(tx->GetWitnessHash());
if (it != package_result.m_tx_results.end() && it->second.m_state.IsInvalid()) {
throw JSONRPCTransactionError(TransactionError::MEMPOOL_REJECTED,
strprintf("%s failed: %s", tx->GetHash().ToString(), it->second.m_state.GetRejectReason()));
strprintf("%s failed: %s", tx->GetHash().ToString(), it->second.m_state.ToString()));
}
}
// If a PCKG_TX error was returned, there must have been an invalid transaction.
Expand Down

0 comments on commit 1247e21

Please sign in to comment.