Skip to content

Commit 542109a

Browse files
committed
Merge #57: Scanning fails when birthday block does not exist
c5c22ad fix(cliv2): scanning fails when birthday block does not exist (nymius) Pull request description: When the wallet is just created, there is no blocks on the `LocalChain`, making the request of the birthday checkpoint impossible to serve. This change avoids the issue by directly using the height and hash set on the wallet.birthday field. ACKs for top commit: nymius: self ACK c5c22ad Tree-SHA512: 5c9b7f6439858663127bfe7157acdb194b7a449c3aa89273e31956361e7a903b2bc8cbab4d16234a45bc11f25ae4b0d4bbe9fc3a2807be432a1a1436eb8faa95
2 parents 4f96a0e + c5c22ad commit 542109a

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

cli/v2/src/main.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -335,13 +335,7 @@ async fn main() -> anyhow::Result<()> {
335335
let hash = wallet.chain().tip().hash();
336336
HeaderCheckpoint::new(height, hash)
337337
} else {
338-
let checkpoint = wallet
339-
.chain()
340-
.get(wallet.birthday.height)
341-
.expect("should be something");
342-
let height = checkpoint.height();
343-
let hash = checkpoint.hash();
344-
HeaderCheckpoint::new(height, hash)
338+
HeaderCheckpoint::new(wallet.birthday.height, wallet.birthday.hash)
345339
};
346340

347341
tracing::info!(

0 commit comments

Comments
 (0)