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

btcctl uptime command returns the current time, not the uptime #2202

Closed
cec489 opened this issue Jun 24, 2024 · 3 comments
Closed

btcctl uptime command returns the current time, not the uptime #2202

cec489 opened this issue Jun 24, 2024 · 3 comments

Comments

@cec489
Copy link
Contributor

cec489 commented Jun 24, 2024

I'm using utreexod, which is based on btcd. The uptime command returns the current time:

~/utreexod/utreexod$ ./utreexoctl --datadir=/mnt/T9/utreexod/bridge-assume-prune uptime
1719253093
~/utreexod/utreexod$ date +%s
1719253095

Looks like this happens because the startupTime in the server struct is 0 when its set in the rpc server config. startupTime is set later when the server Start() is called.

@cec489
Copy link
Contributor Author

cec489 commented Jun 24, 2024

... same for btcd master branch

~/btcd/btcd$ ./btcctl uptime
1719255124

@chrisguida
Copy link

Confirmed, I'm also seeing this

@cec489 cec489 closed this as completed Jun 27, 2024
@cec489
Copy link
Contributor Author

cec489 commented Jun 27, 2024

PR was merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants