Skip to content

Commit 4541a0e

Browse files
committed
Move Bitcoind sync logic to a BitcoindChainSource type
We refactor our `ChainSource` logic and move out the Bitcoind code into a new object.
1 parent 40d6440 commit 4541a0e

File tree

2 files changed

+567
-523
lines changed

2 files changed

+567
-523
lines changed

src/chain/bitcoind.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77

88
use crate::types::{ChainMonitor, ChannelManager, Sweeper, Wallet};
99

10-
use base64::prelude::BASE64_STANDARD;
11-
use base64::Engine;
12-
use bitcoin::{BlockHash, FeeRate, Transaction, Txid};
1310
use lightning::chain::Listen;
11+
1412
use lightning_block_sync::gossip::UtxoSource;
1513
use lightning_block_sync::http::{HttpEndpoint, JsonResponse};
1614
use lightning_block_sync::poll::ValidatedBlockHeader;
@@ -19,9 +17,12 @@ use lightning_block_sync::rpc::{RpcClient, RpcError};
1917
use lightning_block_sync::{
2018
AsyncBlockSourceResult, BlockData, BlockHeaderData, BlockSource, Cache,
2119
};
22-
2320
use serde::Serialize;
2421

22+
use base64::prelude::BASE64_STANDARD;
23+
use base64::Engine;
24+
use bitcoin::{BlockHash, FeeRate, Transaction, Txid};
25+
2526
use std::collections::{HashMap, VecDeque};
2627
use std::sync::atomic::{AtomicU64, Ordering};
2728
use std::sync::Arc;

0 commit comments

Comments
 (0)