From 50c557083dc93b8dc72fc18c0eef97fb6f4c86e9 Mon Sep 17 00:00:00 2001 From: Steven Roose Date: Tue, 7 May 2019 20:13:42 +0100 Subject: [PATCH] Report IsValidPeginWitness error message --- src/wallet/rpcwallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 942e7e191e..b442265440 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -5209,7 +5209,7 @@ static UniValue createrawpegin(const JSONRPCRequest& request, T_tx_ref& txBTCRef // We re-check depth before returning with more descriptive result std::string err; if (!IsValidPeginWitness(pegin_witness, mtx.vin[0].prevout, err, false)) { - throw JSONRPCError(RPC_INVALID_PARAMETER, "Constructed peg-in witness is invalid."); + throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Constructed peg-in witness is invalid: %s", err)); } // Put input witness in transaction