Skip to content

Commit be132b6

Browse files
committed
update
1 parent 68ebe5f commit be132b6

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

bindings/src/channelmonitor.rs

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
use std::sync::Arc;
22

3-
use bitcoin::blockdata::script::Script;
43
use bitcoin::blockdata::transaction::Transaction;
5-
use bitcoin::blockdata::block::Block;
6-
use bitcoin_hashes::sha256d::Hash as Sha256dHash;
74

85
use lightning::chain::transaction::OutPoint;
9-
use lightning::chain::chaininterface::{ChainWatchInterface, ChainError};
106
use lightning::chain::keysinterface::{InMemoryChannelKeys};
117
use lightning::ln::channelmonitor::SimpleManyChannelMonitor;
128

@@ -15,46 +11,6 @@ use crate::adaptors::primitives::{FFIScript, FFIOutPoint, FFIBlock, FFISha256dHa
1511
use crate::error::FFIResult;
1612
use crate::handle::{Ref, HandleShared, Out};
1713

18-
19-
mod ChainWatchInterfaceFn {
20-
use super::*;
21-
pub type install_watch_tx_ptr = extern "cdecl" fn(*const FFIChainWatchInterface, *const FFISha256dHash, script_pub_key: *const FFIScript);
22-
pub type install_watch_outpoint_ptr = extern "cdecl" fn(*const FFIChainWatchInterface, outpoint: *const FFIOutPoint, out_script: *const FFIScript);
23-
pub type watch_all_txn_ptr = extern "cdecl" fn(*const FFIChainWatchInterface);
24-
pub type get_chain_utxo_ptr = extern "cdecl" fn(*const FFIChainWatchInterface, genesis_hash: *const FFISha256dHash, unspent_tx_output_identifier: u64, err: *mut ChainError, script: *mut FFITxOut);
25-
pub type filter_block_ptr = extern "cdecl" fn(*const FFIChainWatchInterface, *const FFIBlock);
26-
}
27-
28-
#[repr(C)]
29-
pub struct FFIChainWatchInterface {
30-
install_watch_tx_ptr: ChainWatchInterfaceFn::install_watch_tx_ptr,
31-
install_watch_outpoint_ptr: ChainWatchInterfaceFn::install_watch_tx_ptr,
32-
watch_all_txn_ptr: ChainWatchInterfaceFn::watch_all_txn_ptr,
33-
get_chain_utxo_ptr: ChainWatchInterfaceFn::get_chain_utxo_ptr,
34-
filter_block_ptr: ChainWatchInterfaceFn::filter_block_ptr,
35-
}
36-
37-
impl ChainWatchInterface for FFIChainWatchInterface {
38-
fn install_watch_tx(&self, txid: &Sha256dHash, script_pub_key: &Script) {
39-
(self.install_watch_tx_ptr)(self, &txid.into() as *const _, &script_pub_key.into() as *const _)
40-
}
41-
fn install_watch_outpoint(&self, outpoint: (Sha256dHash, u32), out_script: &Script) {
42-
unimplemented!("TODO")
43-
}
44-
fn watch_all_txn(&self) {
45-
unimplemented!()
46-
}
47-
fn get_chain_utxo(&self, genesis_hash: Sha256dHash, unspent_tx_output_identifier: u64) -> Result<(Script, u64), ChainError> {
48-
unimplemented!()
49-
}
50-
fn filter_block<'a>(&self, block: &'a Block) -> (Vec<&'a Transaction>, Vec<u32>) {
51-
unimplemented!()
52-
}
53-
fn reentered(&self) -> usize {
54-
unimplemented!()
55-
}
56-
}
57-
5814
type FFIManyChannelMonitor = SimpleManyChannelMonitor<u64, InMemoryChannelKeys, Arc<FFIBroadCaster>, Arc<FFIFeeEstimator>>;
5915
type FFIManyChannelMonitorHandle<'a> = HandleShared<'a, FFIManyChannelMonitor>;
6016

0 commit comments

Comments
 (0)