From fa9ef2cdbed32438bdb32623af6e06f13ecd35e4 Mon Sep 17 00:00:00 2001 From: Ben Woosley Date: Wed, 15 Jan 2020 14:02:31 -0800 Subject: Remove an apparently unnecessary conversion CScript -> CScriptID -> ScriptHash is unnecessary because ScriptHash and CScriptID do the same thing. --- src/wallet/rpcdump.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index d9fe741a6e..541675bcef 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -297,7 +297,7 @@ UniValue importaddress(const JSONRPCRequest& request) pwallet->ImportScripts(scripts, 0 /* timestamp */); if (fP2SH) { - scripts.insert(GetScriptForDestination(ScriptHash(CScriptID(redeem_script)))); + scripts.insert(GetScriptForDestination(ScriptHash(redeem_script))); } pwallet->ImportScriptPubKeys(strLabel, scripts, false /* have_solving_data */, true /* apply_label */, 1 /* timestamp */); -- cgit v1.2.3