From 36f8002f93cadbc143bd619390079b5976fcb88d Mon Sep 17 00:00:00 2001 From: Scott Sadler Date: Sun, 17 Jun 2018 17:20:20 -0300 Subject: [PATCH] fix GetNextBacknotarisation --- src/crosschain.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/crosschain.cpp b/src/crosschain.cpp index ddceb1b9b..d6493f35d 100644 --- a/src/crosschain.cpp +++ b/src/crosschain.cpp @@ -198,7 +198,16 @@ bool GetNextBacknotarisation(uint256 kmdNotarisationTxid, Notarisation &out) if (!GetBackNotarisation(kmdNotarisationTxid, bn)) return false; - return (bool) ScanNotarisationsFromHeight(bn.second.height+1, &IsSameAssetChain, out); + // Need to get block height of that backnotarisation + EvalRef eval; + CBlockIndex block; + CTransaction tx; + if (!eval->GetTxConfirmed(bn.first, tx, block)){ + fprintf(stderr, "Can't get height of backnotarisation, this should not happen\n"); + return false; + } + + return (bool) ScanNotarisationsFromHeight(block.nHeight+1, &IsSameAssetChain, out); }