X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=blobdiff_plain;f=backends%2Flibbitcoin%2Fhistory.cpp;h=1379be4f83eba14f98633c09b2c8db72047386b2;hp=76dc71318a5518e01375efe8985d3866fdd42827;hb=4565e5be9d30d3d28f9319f613cd5311081fc4d7;hpb=608eb0b73118735c11f10468b51d607ac6d02232 diff --git a/backends/libbitcoin/history.cpp b/backends/libbitcoin/history.cpp index 76dc713..1379be4 100644 --- a/backends/libbitcoin/history.cpp +++ b/backends/libbitcoin/history.cpp @@ -542,10 +542,14 @@ void keep_query_alive_proxy(const std::error_code& ec, write_info(json, entry->loaded_input); } } - for (info_unit_ptr info: membuf_result) - { + // A bit of super glue + if (!statement.empty() && !membuf_result.empty()) json += ","; - write_info(json, info); + for (auto it = membuf_result.begin(); it != membuf_result.end(); ++it) + { + if (it != membuf_result.begin()) + json += ","; + write_info(json, *it); } json += "]"; pyfunction f(handle_finish);