projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
da298e4
)
Tweak documentation in `BestBlock` to be a bit more clear
2021-06-more-chan-data
author
Matt Corallo
<git@bluematt.me>
Mon, 5 Jul 2021 18:31:32 +0000
(18:31 +0000)
committer
Matt Corallo
<git@bluematt.me>
Tue, 6 Jul 2021 00:18:27 +0000
(
00:18
+0000)
lightning/src/chain/mod.rs
patch
|
blob
|
history
diff --git
a/lightning/src/chain/mod.rs
b/lightning/src/chain/mod.rs
index 2e1eaea4e5f5b7d54c9828f4b6db769388f0ec89..cec09459233daef7b9c38582e17f984d10fa0d6d 100644
(file)
--- a/
lightning/src/chain/mod.rs
+++ b/
lightning/src/chain/mod.rs
@@
-38,7
+38,8
@@
pub struct BestBlock {
}
impl BestBlock {
}
impl BestBlock {
- /// Returns the best block from the genesis of the given network.
+ /// Constructs a `BestBlock` that represents the genesis block at height 0 of the given
+ /// network.
pub fn from_genesis(network: Network) -> Self {
BestBlock {
block_hash: genesis_block(network).header.block_hash(),
pub fn from_genesis(network: Network) -> Self {
BestBlock {
block_hash: genesis_block(network).header.block_hash(),
@@
-46,7
+47,7
@@
impl BestBlock {
}
}
}
}
- /// Returns
the best block
as identified by the given block hash and height.
+ /// Returns
a `BestBlock`
as identified by the given block hash and height.
pub fn new(block_hash: BlockHash, height: u32) -> Self {
BestBlock { block_hash, height }
}
pub fn new(block_hash: BlockHash, height: u32) -> Self {
BestBlock { block_hash, height }
}