If a node is still syncing or hasn't confirmed any blocks since it started and you call the confirmation_history RPC, the confirmations value is an empty string instead of an empty array.
curl -d '{"action": "confirmation_history"}' [::1]:7076
{
"confirmation_stats": {
"count": "0"
},
"confirmations": ""
}
While easy to check for, this makes the response inconsistent depending on whether the node has confirmed a block yet. The expected result for me is an empty array instead of an empty string.
@meltingice I believe this is related to the JSON library being used, which #1871 is setup to help resolve. Currently targeted for V21 as we look to do a larger rework of RPC.
Most helpful comment
@meltingice I believe this is related to the JSON library being used, which #1871 is setup to help resolve. Currently targeted for V21 as we look to do a larger rework of RPC.