From: Alekos Filini Date: Fri, 8 May 2020 22:03:55 +0000 (+0200) Subject: [wallet] Fix potential overflow when adding block heights X-Git-Tag: 0.1.0-beta.1~56 X-Git-Url: http://internal-gitweb-vhost/%22https:/parse/scripts/database/-script/encode/struct.RpcConfig.html?a=commitdiff_plain;h=0e432f3b26fe98a1304f81dc1c3106a088b78b29;p=bdk [wallet] Fix potential overflow when adding block heights --- diff --git a/src/psbt/mod.rs b/src/psbt/mod.rs index 08f15878..1db458b5 100644 --- a/src/psbt/mod.rs +++ b/src/psbt/mod.rs @@ -100,7 +100,7 @@ impl<'a> Satisfier for PSBTSatisfier<'a> { if let Some(current_height) = self.current_height { // TODO: test >= / > - current_height >= self.create_height.unwrap_or(0) + height + current_height as u64 >= self.create_height.unwrap_or(0) as u64 + height as u64 } else { self.assume_height_reached }