Skip to content

uptime RPC returns 0 on first invocation #34423

@carloantinarella

Description

@carloantinarella

Is there an existing issue for this?

  • I have searched the existing issues

Current behaviour

First time bitcoin-cli uptime is called, output is always zero.

Expected behaviour

Expected behavior should be first time invocation of bitcoin-cli uptime shows the actual bitcoind uptime.

Steps to reproduce

On Linux:

  1. ./build/bin/bitcoind -regtest -daemon
  2. sleep 10
  3. ./build/bin/bitcoin-cli -regtest uptime

Output is zero, while non-zero is expected.

Relevant log output

No response

How did you obtain Bitcoin Core

Compiled from source

What version of Bitcoin Core are you using?

v30.99.0-c0e6556e4f51

Operating system and version

Ubuntu 22.04.5 LTS

Machine specifications

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions