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
### Faster scanning for spending transactions with Bitcoin Core's txospenderindex
235
+
236
+
If Bitcoin Core's `txospenderindex` (available in Bitcoin Core 31.0 and newer) is available and synced, Eclair will use it to find channel spending transactions, which is much faster and less expensive than scanning blocks.
237
+
To enable this index, start Bitcoin Core with `-txospenderindex` or add `txospenderindex=1` to your `bitcoin.conf`.
@@ -182,6 +183,22 @@ class BitcoinCoreClient(val rpcClient: BitcoinJsonRPCClient, val lockUtxos: Bool
182
183
}
183
184
}
184
185
186
+
/**
187
+
* Find the transaction spending a given output. Requires `txospenderindex` on the bitcoin code node we're connecting to.
188
+
*
189
+
* @paramoutPoint transaction output
190
+
* @return the transaction that spent this output along with the id of the block it was published in if any, or None if no spending transaction was found
caseJObject(results) => results.map { case (name, o) => name ->BitcoinCoreClient.IndexInfo((o \"synced").extract[Boolean], (o \"best_block_height").extract[Int]) }.toMap
822
+
}
797
823
}
798
824
799
825
objectBitcoinCoreClient {
@@ -871,4 +897,11 @@ object BitcoinCoreClient {
871
897
// @formatter:on
872
898
}
873
899
900
+
/**
901
+
* Information about a bitcoin core inedx
902
+
*
903
+
* @paramsynced true if the index is synced
904
+
* @parambestBlockHeight height of the last indexed block
0 commit comments