]> Untitled Git - bdk/commit
refactor(wallet): Reuse chain position instead of obtaining new one
authorJiri Jakes <jiri@jirijakes.com>
Thu, 5 Dec 2024 08:51:37 +0000 (16:51 +0800)
committer志宇 <hello@evanlinjin.me>
Tue, 10 Dec 2024 11:45:34 +0000 (22:45 +1100)
commitaf92199b69642d60aec509b246b2252c6a41d220
tree621ce1b9db994086847ad8f18b32901333701615
parentcaa0f13d40d000229dd867e6c52039a0c897fed2
refactor(wallet): Reuse chain position instead of obtaining new one

In `Wallet::preselect_utxos()`, the code used to obtain chain position
of the UTXO's transaction from the graph, however the chain position
is already recorded within the UTXO's representation (`LocalOutput`).
This patch reuses the existing chain position instead of obtaining a
fresh one.
crates/wallet/src/wallet/mod.rs