Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Every use of getinfo or getwalletinfo logs two wallet messages #7794

Closed
laanwj opened this issue Apr 3, 2016 · 6 comments
Closed

Every use of getinfo or getwalletinfo logs two wallet messages #7794

laanwj opened this issue Apr 3, 2016 · 6 comments

Comments

@laanwj
Copy link
Member

laanwj commented Apr 3, 2016

I'm not sure if it was always the case, or whether it signifies an underlying problem, but it is weird:

2016-04-03 10:34:10 keypool reserve 1
2016-04-03 10:34:10 keypool return 1
@sipa
Copy link
Member

sipa commented Apr 3, 2016 via email

@jonasschnelli
Copy link
Contributor

https://github.com/bitcoin/bitcoin/blob/0.12/src/wallet/wallet.cpp#L2569 -> It reserves a keypool key and returns it immediately (after getting its time). This is kind of ineffective because there are db operations included.

Why not accessing setKeyPool.begin().nTime while holding cs_wallet directly?

@laanwj
Copy link
Member Author

laanwj commented Apr 4, 2016

Why not accessing setKeyPool.begin().nTime while holding cs_wallet directly?

Good idea, but let's wrap that in a CWallet method.

@paveljanik
Copy link
Contributor

The same happens when you use getnewaddress.

@laanwj
Copy link
Member Author

laanwj commented Apr 6, 2016

Well with getnewaddress you'd expect a keypool line to be reserved (but not returned).

@laanwj
Copy link
Member Author

laanwj commented Apr 28, 2016

Closing after #7816 merged which solves this.

@laanwj laanwj closed this as completed Apr 28, 2016
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants