Browse Source

better error handling when searching

before this change, searching for a 64-char string that didn't correspond to a block hash would fail due to lack of proper error handling on the RpcError response when running the interpret-string-as-blockhash step
fix-133-memory-crash
Dan Janosik 6 years ago
parent
commit
2af05db385
  1. 4
      app/api/rpcApi.js

4
app/api/rpcApi.js

@ -111,7 +111,9 @@ function getBlocksByHash(blockHashes) {
var blocks = [];
client.command(batch).then((responses) => {
responses.forEach((item) => {
blocks.push(item);
if (item.tx) {
blocks.push(item);
}
});
var coinbaseTxids = [];

Loading…
Cancel
Save