projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #3046 from TheBlueMatt/2024-03-fees-are-dust
[rust-lightning]
/
lightning
/
src
/
chain
/
mod.rs
diff --git
a/lightning/src/chain/mod.rs
b/lightning/src/chain/mod.rs
index 5d367bd4afa49d8a1a73306534f2d7e1bb4bf6ab..a8afc7a1acbda8310ad7fb2d6744bca9974465f9 100644
(file)
--- a/
lightning/src/chain/mod.rs
+++ b/
lightning/src/chain/mod.rs
@@
-17,10
+17,12
@@
use bitcoin::network::constants::Network;
use bitcoin::secp256k1::PublicKey;
use crate::chain::channelmonitor::{ChannelMonitor, ChannelMonitorUpdate, MonitorEvent};
use bitcoin::secp256k1::PublicKey;
use crate::chain::channelmonitor::{ChannelMonitor, ChannelMonitorUpdate, MonitorEvent};
-use crate::ln::ChannelId;
+use crate::ln::
types::
ChannelId;
use crate::sign::ecdsa::WriteableEcdsaChannelSigner;
use crate::chain::transaction::{OutPoint, TransactionData};
use crate::sign::ecdsa::WriteableEcdsaChannelSigner;
use crate::chain::transaction::{OutPoint, TransactionData};
+use crate::impl_writeable_tlv_based;
+#[allow(unused_imports)]
use crate::prelude::*;
pub mod chaininterface;
use crate::prelude::*;
pub mod chaininterface;
@@
-31,7
+33,7
@@
pub(crate) mod onchaintx;
pub(crate) mod package;
/// The best known block as identified by its hash and height.
pub(crate) mod package;
/// The best known block as identified by its hash and height.
-#[derive(Clone, Copy, PartialEq, Eq)]
+#[derive(Clone, Copy,
Debug, Hash,
PartialEq, Eq)]
pub struct BestBlock {
/// The block's hash
pub block_hash: BlockHash,
pub struct BestBlock {
/// The block's hash
pub block_hash: BlockHash,
@@
-55,6
+57,11
@@
impl BestBlock {
}
}
}
}
+impl_writeable_tlv_based!(BestBlock, {
+ (0, block_hash, required),
+ (2, height, required),
+});
+
/// The `Listen` trait is used to notify when blocks have been connected or disconnected from the
/// chain.
/// The `Listen` trait is used to notify when blocks have been connected or disconnected from the
/// chain.