From ba2bd6353366b8bb625bc576fac8685264a4daea Mon Sep 17 00:00:00 2001 From: Jonathan Gillham Date: Mon, 6 Jun 2016 04:35:53 +0100 Subject: [PATCH] mining: Stop transactions losing their dependants. This fixes a bug where a transaction would lose reference to other transactions dependant on it when being considered for inclusion in a new block template. The issue only occurs when the transaction being considered triggers a change of priority queue ordering to ordering by fee. It results in none of the dependant transactions being considered for inclusion in the new block template. --- mining.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mining.go b/mining.go index 75697487..2116a4cc 100644 --- a/mining.go +++ b/mining.go @@ -1435,12 +1435,8 @@ mempoolLoop: // Store if this is an SSRtx or not. isSSRtx := prioItem.txType == stake.TxTypeSSRtx - // Grab the list of transactions which depend on this one (if - // any) and remove the entry for this transaction as it will - // either be included or skipped, but in either case the deps - // are no longer needed. + // Grab the list of transactions which depend on this one (if any). deps := dependers[*tx.Hash()] - delete(dependers, *tx.Hash()) // Skip if we already have too many SStx. if isSStx && (numSStx >=