Skip to content

Commit ec8c2fd

Browse files
committed
f - move OwnedTransactionData to lightning-block-sync
1 parent 3d93a95 commit ec8c2fd

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lightning-block-sync/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ mod utils;
4646
use crate::poll::{ChainTip, Poll, ValidatedBlockHeader};
4747

4848
use bitcoin::blockdata::block::{Block, BlockHeader};
49+
use bitcoin::blockdata::transaction::Transaction;
4950
use bitcoin::hash_types::BlockHash;
5051
use bitcoin::util::uint::Uint256;
5152

5253
use lightning::chain;
5354
use lightning::chain::Listen;
54-
use lightning::chain::transaction::OwnedTransactionData;
5555

5656
use std::future::Future;
5757
use std::ops::Deref;
@@ -164,6 +164,11 @@ pub enum BlockData {
164164
FilteredBlock(BlockHeader, OwnedTransactionData),
165165
}
166166

167+
/// Similar to [`TransactionData`] only for [`Transaction`] data owned outside of a block.
168+
///
169+
/// [`TransactionData`]: chain::transaction::TransactionData
170+
pub type OwnedTransactionData = Vec<(usize, Transaction)>;
171+
167172
/// A lightweight client for keeping a listener in sync with the chain, allowing for Simplified
168173
/// Payment Verification (SPV).
169174
///

lightning/src/chain/transaction.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ use prelude::Vec;
4545
/// ```
4646
pub type TransactionData<'a> = [(usize, &'a Transaction)];
4747

48-
/// Similar to [`TransactionData`] only for [`Transaction`] data owned outside of a block.
49-
pub type OwnedTransactionData = Vec<(usize, Transaction)>;
50-
5148
/// A reference to a transaction output.
5249
///
5350
/// Differs from bitcoin::blockdata::transaction::OutPoint as the index is a u16 instead of u32

0 commit comments

Comments
 (0)