aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcdump.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-10-13 15:21:03 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-10-13 14:57:52 +0200
commit33330778230961cfbf2a24de36b5877e395cc596 (patch)
treed64f2f2a59a16d02025485e0e976280cf122c79a /src/wallet/rpcdump.cpp
parentcccc7525697e7b8d99b545e34f0f504c78ffdb94 (diff)
downloadbitcoin-33330778230961cfbf2a24de36b5877e395cc596.tar.xz
rpc: Adjust witness-tx deserialize error message
Diffstat (limited to 'src/wallet/rpcdump.cpp')
-rw-r--r--src/wallet/rpcdump.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp
index e0c3a1287a..e343ef3bc3 100644
--- a/src/wallet/rpcdump.cpp
+++ b/src/wallet/rpcdump.cpp
@@ -334,8 +334,9 @@ UniValue importprunedfunds(const JSONRPCRequest& request)
CWallet* const pwallet = wallet.get();
CMutableTransaction tx;
- if (!DecodeHexTx(tx, request.params[0].get_str()))
- throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
+ if (!DecodeHexTx(tx, request.params[0].get_str())) {
+ throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed. Make sure the tx has at least one input.");
+ }
uint256 hashTx = tx.GetHash();
CDataStream ssMB(ParseHexV(request.params[1], "proof"), SER_NETWORK, PROTOCOL_VERSION);