Skip to content

blockResults got decodeConsensusParams error with Chihuahua #1543

@jiqiang90

Description

@jiqiang90

Hi, I'm using Tendermint37Client trying to get blockResults for chihuahua network, and got error

Error: Value must not be undefined
    at assertSet (/Users/jiatwork/subql4/chihuahua-test/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/encodings.js:12:15)
    at assertObject (/Users/jiatwork/subql4/chihuahua-test/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/encodings.js:84:5)
    at decodeConsensusParams (/Users/jiatwork/subql4/chihuahua-test/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/adaptor/responses.js:119:63)
    at may (/Users/jiatwork/subql4/chihuahua-test/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/encodings.js:118:64)
    at decodeBlockResults (/Users/jiatwork/subql4/chihuahua-test/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/adaptor/responses.js:135:47)
    at decodeBlockResults (/Users/jiatwork/subql4/chihuahua-test/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/adaptor/responses.js:385:16)
    at Tendermint37Client.doCall (/Users/jiatwork/subql4/chihuahua-test/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/tendermint37client.js:309:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

To reproduce this:

import {Tendermint37Client} from "@cosmjs/tendermint-rpc"


async function fetchBlockResult(): Promise<void>{
    const tendermintClient = await Tendermint37Client.connect("https://chihuahua-rpc.publicnode.com:443");
    const result = await tendermintClient.blockResults(10925390)
    console.log(result);
}

fetchBlockResult();

No problem with https://chihuahua-rpc.publicnode.com/block_results?height=10925390
Please point out If I haven't done this correctly. Thank you.

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