aboutsummaryrefslogtreecommitdiff
path: root/src/rpcdump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpcdump.cpp')
-rw-r--r--src/rpcdump.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index c286626fd..1ac702455 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -6,9 +6,11 @@
#include "rpcserver.h"
#include "init.h"
#include "main.h"
+#include "script/script.h"
+#include "script/standard.h"
#include "sync.h"
-#include "utiltime.h"
#include "util.h"
+#include "utiltime.h"
#include "wallet.h"
#include <fstream>
@@ -16,6 +18,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
+
#include "json/json_spirit_value.h"
using namespace json_spirit;
@@ -160,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());