Debugging issue call with RPC

0 votes
I'm trying to issue a new asset via rpc (with settings anybody-can-issue and anybody-can-admin to true) but always receive an error 500. Other calls (listunspend, listassets, getpeerinfo, ...) seem to work. I tried starting multichaind with de -debug option but the logs only dump "<datetime> ThreadRPCServer method=issue". I've tried issueing with multichain-cli and that works perfectly. Is there a way to debug the issue or run testing to see where the issue might be? I'm using the latest version: "MultiChain Core RPC client build 1.0 alpha 8 protocol 10002"
asked Oct 19, 2015 by anonymous

1 Answer

0 votes
Your best bet is to output the raw JSON-RPC payload that your script is sending over HTTP, and compare that the output shown on the command line when you use multichain-cli. If you're using the final optional custom fields parameter, that's the most likely culprit.
answered Oct 19, 2015 by MultiChain
I see the difference is the 'chain_name' parameter. With multichain-cli it's not a parameter but straight in the body of the request. As far as I can see, this is kind of a break with the regular json-rpc standard. Is there a way to move the parameter?
You can just remove it completely - it's there as an extra check when multichain-cli talks to multichaind, to ensure they're talking about the same chain. But since as you say it's not part of the JSON-RPC standard, it's optional.