You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: refused spark send reads liveness before the record mark #1908
LightningRepo.settledSparkSendOutcome reads isSendLive before sparkRepo.sendRecordMark(). earlierLightningSend and earlierNodeSend read the mark first.
A competing Spark send can be admitted, enter sendsInFlight and record its send between those two statements. If it then finishes during the lightningSend row read, the post-read checks see nothing live, and an older FAILED row turns the refused send into SendRefused while the competing send paid.
The window is two adjacent non-suspending statements, and the competing send has to finish inside the row read.
Fix
Read the mark first:
val sparkRecordsBefore = sparkRepo.sendRecordMark()
val wasLive = isSendLive(paymentHash, key, ldkRecordsBefore)
Activity
ovitrif commentedon Nov 12, 2026
Milestone 3.2.0: this issue is a bug in Spark sends, a follow-up to #1900, and Spark sends ship in 3.2.0.