Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Crown
crown-core
Commits
1f12844f
Commit
1f12844f
authored
11 years ago
by
Cozz Lovan
Browse files
Options
Download
Email Patches
Plain Diff
Fix importprivkey / rescan
parent
13e99e46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/rpcdump.cpp
+5
-0
src/rpcdump.cpp
with
5 additions
and
0 deletions
+5
-0
src/rpcdump.cpp
View file @
1f12844f
...
...
@@ -116,9 +116,14 @@ Value importprivkey(const Array& params, bool fHelp)
if
(
pwalletMain
->
HaveKey
(
vchAddress
))
return
Value
::
null
;
pwalletMain
->
mapKeyMetadata
[
vchAddress
].
nCreateTime
=
1
;
if
(
!
pwalletMain
->
AddKeyPubKey
(
key
,
pubkey
))
throw
JSONRPCError
(
RPC_WALLET_ERROR
,
"Error adding key to wallet"
);
// whenever a key is imported, we need to scan the whole chain
pwalletMain
->
nTimeFirstKey
=
1
;
// 0 would be considered 'no value'
if
(
fRescan
)
{
pwalletMain
->
ScanForWalletTransactions
(
chainActive
.
Genesis
(),
true
);
pwalletMain
->
ReacceptWalletTransactions
();
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help