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
After crafting the funding transaction you'll need to send it to the Bitcoin network where it will hopefully be mined and added to the blockchain. You'll need to watch this transaction and wait for a minimum of 6 confirmations before the channel is ready to use.
override fun broadcast_transaction(tx:ByteArray?) {
192
+
val esploraURL ="esploraUrl"
193
+
val blockchainConfig =BlockchainConfig.Esplora(EsploraConfig(esploraURL, null, 5u, 20u, null))
194
+
val blockchain = Blockchain(blockchainConfig)
195
+
196
+
val uByteArray = UByteArray(tx.size) { tx[it].toUByte() }
197
+
val transaction = Transaction(uByteArray.toList())
198
+
199
+
tx?.let {
200
+
CoroutineScope(Dispatchers.IO).launch {
201
+
blockchain.broadcast(transaction)
202
+
}
203
+
} ?:throw(IllegalStateException("Broadcaster attempted to broadcast a null transaction"))
204
+
205
+
}
206
+
}
207
+
208
+
```
209
+
210
+
</template>
211
+
</CodeSwitcher>
212
+
213
+
::: tip Keep LDK in sync
214
+
215
+
Remember if you are restarting and have open channels then you should [let LDK know about the latest channel state.](./setting-up-a-channel-manager/#sync-channelmonitors-and-channelmanager-to-chain-tip)
Copy file name to clipboardExpand all lines: docs/tutorials/building-a-node-with-ldk/setting-up-a-channel-manager.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -731,7 +731,7 @@ LDK's `lightning_block_sync` sample module as in the example above: the high-lev
731
731
732
732
**Esplora**
733
733
734
-
Alternatively, you can use LDK's `lightning-block-sync` crate. This provides utilities for syncing LDK via the transaction-based Confirm interface.
734
+
Alternatively, you can use LDK's `lightning-transaction-sync` crate. This provides utilities for syncing LDK via the transaction-based `Confirm` interface.
**Optional dependency:**`Access`, a source of chain information. Recommended to be able to verify channels before adding them to the internal network graph.
0 commit comments