From 0a397ef71e538681d8699183ef551f9aefcb3568 Mon Sep 17 00:00:00 2001 From: Brord van Wierst Date: Wed, 24 Apr 2019 16:18:49 +0200 Subject: [PATCH] Fixed nullpointer when receiving requested tx after pruned state confirmed --- .../impl/PrunedTransactionVerifierImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/iota/iri/service/transactionpruning/impl/PrunedTransactionVerifierImpl.java b/src/main/java/com/iota/iri/service/transactionpruning/impl/PrunedTransactionVerifierImpl.java index 31f8ac3cb7..7ea1b91c16 100644 --- a/src/main/java/com/iota/iri/service/transactionpruning/impl/PrunedTransactionVerifierImpl.java +++ b/src/main/java/com/iota/iri/service/transactionpruning/impl/PrunedTransactionVerifierImpl.java @@ -84,7 +84,7 @@ public boolean isPruned(Hash hash) throws PrunedTransactionException{ public void submitTransaction(TransactionViewModel receivedTransactionViewModel) throws PrunedTransactionException { Hash parent = receivedTransactionViewModel.getHash(); Hash child = getChildForParent(parent); - if (isPruned(child)) { + if (child == null || isPruned(child)) { // We succeeded in the meantime. return; } @@ -95,7 +95,7 @@ public void submitTransaction(TransactionViewModel receivedTransactionViewModel) if (isPruned(child)) { // We succeeded in the meantime. - clean(child); + parents.remove(child); return; }