Add FIAT_RECEIVED state to start broadcast at startup

This commit is contained in:
Manfred Karrer 2016-06-03 12:01:41 +02:00
parent 4b5fbafe91
commit 3c5da3007a
4 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ public class BuyerAsOffererProtocol extends TradeProtocol implements BuyerProtoc
// If we are after the time lock state we need to setup the listener again
Trade.State tradeState = trade.getState();
if (tradeState.getPhase() == Trade.Phase.PAYOUT_PAID && tradeState != Trade.State.PAYOUT_BROAD_CASTED) {
if ((tradeState.getPhase() == Trade.Phase.FIAT_RECEIVED || tradeState.getPhase() == Trade.Phase.PAYOUT_PAID) && tradeState != Trade.State.PAYOUT_BROAD_CASTED) {
TradeTaskRunner taskRunner = new TradeTaskRunner(trade,
() -> {

View File

@ -53,7 +53,7 @@ public class BuyerAsTakerProtocol extends TradeProtocol implements BuyerProtocol
// If we are after the timeLock state we need to setup the listener again
Trade.State tradeState = trade.getState();
if (tradeState.getPhase() == Trade.Phase.PAYOUT_PAID && tradeState != Trade.State.PAYOUT_BROAD_CASTED) {
if ((tradeState.getPhase() == Trade.Phase.FIAT_RECEIVED || tradeState.getPhase() == Trade.Phase.PAYOUT_PAID) && tradeState != Trade.State.PAYOUT_BROAD_CASTED) {
TradeTaskRunner taskRunner = new TradeTaskRunner(trade,
() -> {
handleTaskRunnerSuccess("SetupPayoutTxLockTimeReachedListener");

View File

@ -53,7 +53,7 @@ public class SellerAsOffererProtocol extends TradeProtocol implements SellerProt
// If we are after the time lock state we need to setup the listener again
//TODO not sure if that is not called already from the checkPayoutTxTimeLock at tradeProtocol
Trade.State tradeState = trade.getState();
if (tradeState.getPhase() == Trade.Phase.PAYOUT_PAID && tradeState != Trade.State.PAYOUT_BROAD_CASTED) {
if ((tradeState.getPhase() == Trade.Phase.FIAT_RECEIVED || tradeState.getPhase() == Trade.Phase.PAYOUT_PAID) && tradeState != Trade.State.PAYOUT_BROAD_CASTED) {
TradeTaskRunner taskRunner = new TradeTaskRunner(trade,
() -> {
handleTaskRunnerSuccess("SetupPayoutTxLockTimeReachedListener");

View File

@ -55,7 +55,7 @@ public class SellerAsTakerProtocol extends TradeProtocol implements SellerProtoc
// If we are after the timeLock state we need to setup the listener again
//TODO not sure if that is not called already from the checkPayoutTxTimeLock at tradeProtocol
Trade.State tradeState = trade.getState();
if (tradeState.getPhase() == Trade.Phase.PAYOUT_PAID && tradeState != Trade.State.PAYOUT_BROAD_CASTED) {
if ((tradeState.getPhase() == Trade.Phase.FIAT_RECEIVED || tradeState.getPhase() == Trade.Phase.PAYOUT_PAID) && tradeState != Trade.State.PAYOUT_BROAD_CASTED) {
TradeTaskRunner taskRunner = new TradeTaskRunner(trade,
() -> {
handleTaskRunnerSuccess("SetupPayoutTxLockTimeReachedListener");