File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -640,6 +640,8 @@ UniValue dumpwallet(const JSONRPCRequest& request)
640
640
const std::map<CKeyID, int64_t >& mapKeyPool = pwallet->GetAllReserveKeys ();
641
641
pwallet->GetKeyBirthTimes (mapKeyBirth);
642
642
643
+ std::set<CScriptID> scripts = pwallet->GetCScripts ();
644
+
643
645
// sort time/key pairs
644
646
std::vector<std::pair<int64_t , CKeyID> > vKeyBirth;
645
647
for (const auto & entry : mapKeyBirth) {
@@ -694,6 +696,15 @@ UniValue dumpwallet(const JSONRPCRequest& request)
694
696
}
695
697
}
696
698
file << " \n " ;
699
+ for (const CScriptID &scriptid : scripts) {
700
+ CScript script;
701
+ std::string address = EncodeDestination (scriptid);
702
+ if (pwallet->GetCScript (scriptid, script)) {
703
+ file << strprintf (" %s 0 script=1" , HexStr (script.begin (), script.end ()));
704
+ file << strprintf (" # addr=%s\n " , address);
705
+ }
706
+ }
707
+ file << " \n " ;
697
708
file << " # End of dump\n " ;
698
709
file.close ();
699
710
You can’t perform that action at this time.
0 commit comments