komodo_getblockindex instead of mapblockindex[] to prevent creation of new entry on miss

This commit is contained in:
jl777
2018-11-23 04:17:34 -11:00
parent d39300e3ff
commit 7d54574d4c
7 changed files with 15 additions and 8 deletions

View File

@@ -266,7 +266,7 @@ TxProof GetAssetchainProof(uint256 hash)
if (blockHash.IsNull())
throw std::runtime_error("tx still in mempool");
blockIndex = mapBlockIndex[blockHash];
blockIndex = komodo_getblockindex(blockHash);
int h = blockIndex->GetHeight();
// The assumption here is that the first notarisation for a height GTE than
// the transaction block height will contain the corresponding MoM. If there