mirror of
https://github.com/ACINQ/eclair.git
synced 2025-02-23 06:35:11 +01:00
now looking for revoked tx starting from the latest
This commit is contained in:
parent
6bbffd1f84
commit
9114fd72bd
1 changed files with 1 additions and 1 deletions
|
@ -973,7 +973,7 @@ class Node(val blockchain: ActorRef, val params: OurChannelParams, val anchorDat
|
|||
case None =>
|
||||
// it has to be one of the revoked tx
|
||||
// one way is to use the main revocation hash, and rebuild the pub script we signed
|
||||
(0L until commitment.index)
|
||||
(commitment.index - 1 to 0L by -1)
|
||||
.find { i =>
|
||||
val theirRevocationHash = Crypto.sha256(ShaChain.getHash(shaChain, i).get)
|
||||
publishedTx.txOut.exists(o => o.publicKeyScript.data.toArray.deep == Script.write(pay2sh(redeemSecretOrDelay(theirParams.finalPubKey, ourParams.delay, ourFinalPubKey, theirRevocationHash))).deep)
|
||||
|
|
Loading…
Add table
Reference in a new issue