Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include <chain.h> | #include <chain.h> | ||||
#include <config.h> | #include <config.h> | ||||
#include <core_io.h> | #include <core_io.h> | ||||
#include <interfaces/chain.h> | #include <interfaces/chain.h> | ||||
#include <key_io.h> | #include <key_io.h> | ||||
#include <merkleblock.h> | #include <merkleblock.h> | ||||
#include <rpc/server.h> | #include <rpc/server.h> | ||||
#include <rpc/util.h> | #include <rpc/util.h> | ||||
#include <script/descriptor.h> | #include <script/descriptor.h> | ||||
#include <script/script.h> | #include <script/script.h> | ||||
#include <script/standard.h> | #include <script/standard.h> | ||||
#include <sync.h> | #include <sync.h> | ||||
#include <util/bip32.h> | |||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <util/time.h> | #include <util/time.h> | ||||
#include <util/translation.h> | #include <util/translation.h> | ||||
#include <validation.h> | #include <validation.h> | ||||
#include <wallet/rpcwallet.h> | #include <wallet/rpcwallet.h> | ||||
#include <wallet/wallet.h> | #include <wallet/wallet.h> | ||||
#include <boost/algorithm/string.hpp> | #include <boost/algorithm/string.hpp> | ||||
▲ Show 20 Lines • Show All 992 Lines • ▼ Show 20 Lines | for (std::vector<std::pair<int64_t, CKeyID>>::const_iterator it = | ||||
file << "reserve=1"; | file << "reserve=1"; | ||||
} else if (pwallet->mapKeyMetadata[keyid].hdKeypath == "s") { | } else if (pwallet->mapKeyMetadata[keyid].hdKeypath == "s") { | ||||
file << "inactivehdseed=1"; | file << "inactivehdseed=1"; | ||||
} else { | } else { | ||||
file << "change=1"; | file << "change=1"; | ||||
} | } | ||||
file << strprintf( | file << strprintf( | ||||
" # addr=%s%s\n", strAddr, | " # addr=%s%s\n", strAddr, | ||||
(pwallet->mapKeyMetadata[keyid].hdKeypath.size() > 0 | (pwallet->mapKeyMetadata[keyid].has_key_origin | ||||
? " hdkeypath=" + pwallet->mapKeyMetadata[keyid].hdKeypath | ? " hdkeypath=" + | ||||
WriteHDKeypath( | |||||
pwallet->mapKeyMetadata[keyid].key_origin.path) | |||||
: "")); | : "")); | ||||
} | } | ||||
} | } | ||||
file << "\n"; | file << "\n"; | ||||
for (const CScriptID &scriptid : scripts) { | for (const CScriptID &scriptid : scripts) { | ||||
CScript script; | CScript script; | ||||
std::string create_time = "0"; | std::string create_time = "0"; | ||||
std::string address = EncodeDestination(scriptid, config); | std::string address = EncodeDestination(scriptid, config); | ||||
▲ Show 20 Lines • Show All 841 Lines • Show Last 20 Lines |