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 #3058 from benthecarman/deref-empty-nod-id-lookup
[rust-lightning]
/
lightning
/
src
/
chain
/
mod.rs
diff --git
a/lightning/src/chain/mod.rs
b/lightning/src/chain/mod.rs
index 356520b5cba86e647acdec77fd0cb86b683e7d58..8639e268dff842a68660218b3e57aaa392ea249f 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::sign::ecdsa::
Writeable
EcdsaChannelSigner;
+use crate::ln::
types::
ChannelId;
+use crate::sign::ecdsa::EcdsaChannelSigner;
use crate::chain::transaction::{OutPoint, TransactionData};
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;
@@
-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.
@@
-250,7
+257,7
@@
pub enum ChannelMonitorUpdateStatus {
/// application crashes.
///
/// See method documentation and [`ChannelMonitorUpdateStatus`] for specific requirements.
/// application crashes.
///
/// See method documentation and [`ChannelMonitorUpdateStatus`] for specific requirements.
-pub trait Watch<ChannelSigner:
Writeable
EcdsaChannelSigner> {
+pub trait Watch<ChannelSigner: EcdsaChannelSigner> {
/// Watches a channel identified by `funding_txo` using `monitor`.
///
/// Implementations are responsible for watching the chain for the funding transaction along
/// Watches a channel identified by `funding_txo` using `monitor`.
///
/// Implementations are responsible for watching the chain for the funding transaction along