Skip to content

Regression on payjoin-cli when using bitcoind with older versions. #1383

@benalleng

Description

@benalleng

Trying to run the payjoin-cli with bitcoind v28.1.0 reported a failure to connect to the blockchain perhaps with a change with how the network is reading the api response for the json data itself.

pub fn network(&self) -> Result<Network> {
tokio::task::block_in_place(|| {
tokio::runtime::Handle::current().block_on(async { self.rpc.network().await })
})
.map_err(|_| anyhow!("Failed to get blockchain info"))
}
}

Failed when trying to read this data.

{"result":{"chain":"regtest","blocks":302,"headers":302,"bestblockhash":"5a559292d2b29230f309fddbb42
ef0e669ef2fa5c488a31ea2c95903a400f3e2","difficulty":4.656542373906925e-10,"time":1772738550,"mediant
ime":1772738549,"verificationprogress":1,"initialblockdownload":false,"chainwork":"00000000000000000
0000000000000000000000000000000000000000000025e","size_on_disk":91660,"pruned":false,"warnings":[]},
"error":null,"id":0}

with

Error: Failed to connect to bitcoind. Check config RPC connection.

Caused by:
    Failed to get blockchain info

upgrading to at least v29.0 or reverting back to baf60d4 fixed this problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions