Skip to content

Commit 0784cc1

Browse files
committed
Remove notifications from silentpayments example
1 parent 930be15 commit 0784cc1

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

examples/src/silentpaymentscanner.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use bitcoin::{PrivateKey, XOnlyPublicKey};
88
use bitcoinkernel::{
99
BlockManagerOptions, ChainType, ChainstateLoadOptions, ChainstateManager,
1010
ChainstateManagerOptions, Context, ContextBuilder, KernelError,
11-
KernelNotificationInterfaceCallbackHolder, Log, Logger,
11+
Log, Logger,
1212
};
1313
use env_logger::Builder;
1414
use log::LevelFilter;
@@ -37,15 +37,6 @@ fn setup_logging() -> Result<Logger<MainLog>, KernelError> {
3737
fn create_context() -> Context {
3838
ContextBuilder::new()
3939
.chain_type(ChainType::REGTEST)
40-
.kn_callbacks(Box::new(KernelNotificationInterfaceCallbackHolder {
41-
kn_block_tip: Box::new(|_state, _block_index| {}),
42-
kn_header_tip: Box::new(|_state, _height, _timestamp, _presync| {}),
43-
kn_progress: Box::new(|_title, _progress, _resume_possible| {}),
44-
kn_warning_set: Box::new(|_warning, _message| {}),
45-
kn_warning_unset: Box::new(|_warning| {}),
46-
kn_flush_error: Box::new(|_message| {}),
47-
kn_fatal_error: Box::new(|_message| {}),
48-
}))
4940
.build()
5041
.unwrap()
5142
}

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ unsafe fn cast_string(c_str: *const c_char) -> String {
115115

116116
/// The current synch state, i.e. whether in reindex, ibd, or complete.
117117
/// Emitted by the block tip notification.
118+
#[derive(Debug)]
118119
pub enum SynchronizationState {
119120
INIT_REINDEX,
120121
INIT_DOWNLOAD,

0 commit comments

Comments
 (0)