[wallet] Fix potential overflow when adding block heights

This commit is contained in:
Alekos Filini 2020-05-09 00:03:55 +02:00
parent 1ff9852cff
commit 0e432f3b26
No known key found for this signature in database
GPG Key ID: 5E8AFC3034FDFA4F

View File

@ -100,7 +100,7 @@ impl<'a> Satisfier<bitcoin::PublicKey> for PSBTSatisfier<'a> {
if let Some(current_height) = self.current_height { if let Some(current_height) = self.current_height {
// TODO: test >= / > // 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 { } else {
self.assume_height_reached self.assume_height_reached
} }