Skip to content

Commit

Permalink
chore: sleep after one swap [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
fiksn committed Apr 24, 2023
1 parent d43915e commit 9b5f1b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions plugins/boltz/swapmachine/swapmachine.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ func (s *SwapMachine) FsmSwapSuccessOne(in common.FsmIn) common.FsmOut {
return common.FsmOut{NextState: common.SwapSuccess}
}

//TODO: to prevent race-condition with channel status not getting update, despite swap finished
time.Sleep(30 * time.Second)

return s.nextRound(in)
}

Expand Down
1 change: 0 additions & 1 deletion plugins/boltz/swapmachine/swapmachine_reverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ func (s *SwapMachine) FsmSwapClaimed(in common.FsmIn) common.FsmOut {
}

return common.FsmOut{NextState: common.SwapSuccessOne}

}

func CreateReverseSwapWithSanityCheck(api *bapi.BoltzPrivateAPI, keys *crypto.Keys, sats uint64, referralCode string, currentBlockHeight int, chainparams *chaincfg.Params) (*boltz.CreateReverseSwapResponse, error) {
Expand Down

0 comments on commit 9b5f1b0

Please sign in to comment.