Fix underflow in target height when selecting anchor

This won't occur in practice because Sapling activated at a height well
above ANCHOR_OFFSET, but good to fix anyway.
This commit is contained in:
Jack Grigg 2019-02-13 10:10:23 +00:00
parent 6842c293fe
commit e3ecc6f7dc
No known key found for this signature in database
GPG Key ID: 1B8D649257DB0829
1 changed files with 1 additions and 1 deletions

View File

@ -589,7 +589,7 @@ pub fn send_to_address<P: AsRef<Path>>(
i64::from(account),
value.0,
value.0,
i64::from(height - ANCHOR_OFFSET),
i64::from(height.saturating_sub(ANCHOR_OFFSET)),
],
|row| {
let mut diversifier = Diversifier([0; 11]);