aboutsummaryrefslogtreecommitdiff
path: root/src/rpcdump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpcdump.cpp')
-rw-r--r--src/rpcdump.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index dc73161bf1..1ac7024550 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -6,6 +6,8 @@
#include "rpcserver.h"
#include "init.h"
#include "main.h"
+#include "script/script.h"
+#include "script/standard.h"
#include "sync.h"
#include "util.h"
#include "utiltime.h"
@@ -161,7 +163,7 @@ Value importaddress(const Array& params, bool fHelp)
CBitcoinAddress address(params[0].get_str());
if (address.IsValid()) {
- script.SetDestination(address.Get());
+ script = GetScriptForDestination(address.Get());
} else if (IsHex(params[0].get_str())) {
std::vector<unsigned char> data(ParseHex(params[0].get_str()));
script = CScript(data.begin(), data.end());