Error: Block not found

+1 vote
Hi,

I have a problem getting the block based on the particular block number:

[nprnic@10-22-64-11 ~]$ multichain-cli lexchain6 -datadir=/home/nprnic/lexnode11 -port=1102 -rpcport=1103 getinfo
{"method":"getinfo","params":[],"id":1,"chain_name":"lexchain6"}

{
    "version" : "1.0 alpha 20",
    "protocolversion" : 10005,
    "chainname" : "lexchain6",
    "description" : "MultiChain lexchain6",
    "protocol" : "multichain",
    "port" : 1102,
    "setupblocks" : 60,
    "nodeaddress" : "lexchain6@10.22.64.11:1102",
    "burnaddress" : "1XXXXXXWixXXXXXXXGXXXXXXYtXXXXXXV178zH",
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 374,
    "timeoffset" : 0,
    "connections" : 0,
    "proxy" : "",
    "difficulty" : 0.00001526,
    "testnet" : false,
    "keypoololdest" : 1463531371,
    "keypoolsize" : 2,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00000000,
    "errors" : ""
}
[nprnic@10-22-64-11 ~]$ multichain-cli lexchain6 -datadir=/home/nprnic/lexnode11 -port=1102 -rpcport=1103 getblockcount
{"method":"getblockcount","params":[],"id":1,"chain_name":"lexchain6"}

374
[nprnic@10-22-64-11 ~]$ multichain-cli lexchain6 -datadir=/home/nprnic/lexnode11 -port=1102 -rpcport=1103 getblock 374
{"method":"getblock","params":["374"],"id":1,"chain_name":"lexchain6"}

error code: -5
error message:
Block not found
[nprnic@10-22-64-11 ~]$

Same happen for whatever block number I give, even the 0.

Nenad P.

Malloc Inc.
asked May 17, 2016 by Nenad

1 Answer

0 votes

Before alpha 21 (just released), the getblock API only took a block hash rather than a block number as its parameter. If you upgrade it should work as expected. Since we're still in alpha we made the decision not to clutter the online documentation with version information.

answered May 18, 2016 by MultiChain
...