parent
74f671b09a
commit
55882173a2
1 changed files with 9 additions and 5 deletions
14
account.go
14
account.go
|
@ -390,12 +390,16 @@ func (a *Account) ImportPrivKey(wif string, rescan bool) error {
|
|||
}
|
||||
|
||||
if rescan {
|
||||
addrs := map[string]struct{}{
|
||||
addr: struct{}{},
|
||||
}
|
||||
// Do not wait for rescan to finish before returning to the
|
||||
// caller.
|
||||
go func() {
|
||||
addrs := map[string]struct{}{
|
||||
addr: struct{}{},
|
||||
}
|
||||
|
||||
Rescan(CurrentRPCConn(), bs.Height, addrs)
|
||||
a.writeDirtyToDisk()
|
||||
Rescan(CurrentRPCConn(), bs.Height, addrs)
|
||||
a.writeDirtyToDisk()
|
||||
}()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue