From f9812d72fe7818236e6a9d8127f6057bf8e9c7c1 Mon Sep 17 00:00:00 2001 From: Hellblazer Date: Sat, 10 Feb 2024 12:21:51 -0800 Subject: [PATCH] minor cleanup --- .../apollo/choam/fsm/Reconfiguration.java | 19 ------------------- .../apollo/choam/support/TxDataSource.java | 6 +++--- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/choam/src/main/java/com/salesforce/apollo/choam/fsm/Reconfiguration.java b/choam/src/main/java/com/salesforce/apollo/choam/fsm/Reconfiguration.java index fe34e90d4..66b4e51e4 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/fsm/Reconfiguration.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/fsm/Reconfiguration.java @@ -42,11 +42,6 @@ public void certify() { context().certify(); } - @Override - public Transitions election() { - return RECONFIGURE; - } - @Override public Transitions gathered() { return CERTIFICATION; @@ -62,11 +57,6 @@ public void assembly() { context().gather(); } - @Override - public Transitions election() { - return RECONFIGURE; - } - @Override public Transitions gathered() { return NOMINATION; @@ -97,11 +87,6 @@ public Transitions complete() { return null; } - @Override - public Transitions election() { - return null; - } - @Override public Transitions failed() { return null; @@ -162,10 +147,6 @@ default Transitions complete() { return Reconfigure.RECONFIGURE; } - default Transitions election() { - return null; - } - default Transitions failed() { return Reconfigure.PROTOCOL_FAILURE; } diff --git a/choam/src/main/java/com/salesforce/apollo/choam/support/TxDataSource.java b/choam/src/main/java/com/salesforce/apollo/choam/support/TxDataSource.java index 2972d4120..211f6b720 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/support/TxDataSource.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/support/TxDataSource.java @@ -161,11 +161,11 @@ public void offer(Reassemble reassembly) { } public boolean offer(Transaction txn) { - if (!draining.get()) { - return processing.offer(txn); - } else { + if (draining.get()) { return false; } + + return processing.offer(txn); } public void offer(Validate generateValidation) {