Main Menu

[api] bizarre get_block error

Started by monsterer, April 09, 2016, 08:31:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

monsterer

Many thanks guys - that was indeed the solution :)
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

pc

Quote from: monsterer on April 09, 2016, 08:31:35 PM

{"id":1,"method":"call","params":[0,"get_block",[4658091]]}

{code:1,message:7 bad_cast_exception: Bad Cast
Invalid cast from object_type to Array



I'm with abit - this looks suspiciously like the API change we'd seen in BitShares in February.

get_block 4658091 works for me in the cli_wallet as well as via curl. Most likely your client is not compatible with the latest node.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 [url="http://bitcoin.quisquis.de"]http://bitcoin.quisquis.de[/url]

abit

Quote from: monsterer on April 09, 2016, 08:31:35 PM
This is occuring on the MUSE chain, for some reason, calling the get_block() api call on certain blocks has started failing with a strange error:

{"id":1,"method":"call","params":[0,"get_block",[4658091]]}

{code:1,message:7 bad_cast_exception: Bad Cast
Invalid cast from object_type to Array
    {"type":"object_type"}
    th_a  variant.cpp:530 get_array,data:{code:7,name:bad_cast_exception,message:Bad Cast,stack:[{context:{level:error,file:variant.cpp,line:53
0,method:get_array,hostname:,thread_name:th_a,timestamp:2016-04-09T20:28:59},format:Invalid cast from ${type} to Array,data:{type:object_type}}
]}}


If I call the function on the prior block it returns fine. Any ideas what could be causing this?
Using an old cli_wallet with new witness_node? I guess it's caused by serialization changes on the extensions struct. Just guess, don't count on me.  :P
BitShares committee member: abit
BitShares witness: in.abit

xeroc


monsterer

This is occuring on the MUSE chain, for some reason, calling the get_block() api call on certain blocks has started failing with a strange error:

{"id":1,"method":"call","params":[0,"get_block",[4658091]]}

{code:1,message:7 bad_cast_exception: Bad Cast
Invalid cast from object_type to Array
    {"type":"object_type"}
    th_a  variant.cpp:530 get_array,data:{code:7,name:bad_cast_exception,message:Bad Cast,stack:[{context:{level:error,file:variant.cpp,line:53
0,method:get_array,hostname:,thread_name:th_a,timestamp:2016-04-09T20:28:59},format:Invalid cast from ${type} to Array,data:{type:object_type}}
]}}


If I call the function on the prior block it returns fine. Any ideas what could be causing this?
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads