Tweak processor's slice handling due to a CI failure

The prior code worked without issue for me locally, but apparently it didn't
always.
This commit is contained in:
Luke Parker 2023-04-11 10:37:47 -04:00
parent 61757d5e19
commit a290b74805
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -85,7 +85,7 @@ impl<C: Coin, D: Db> ScannerDb<C, D> {
// Don't add this key if it's already present
let mut i = 0;
while i < keys.len() {
if keys[i .. (i + key_len)].as_ref() == key_bytes.as_ref() {
if &keys[i .. (i + key_len)] == key_bytes.as_ref() {
debug!("adding {} as an active key yet it was already present", hex::encode(key_bytes));
return;
}

View file

@ -61,7 +61,7 @@ impl<C: Coin, D: Db> SignerDb<C, D> {
let mut i = 0;
while i < existing.len() {
if existing[i .. (i + tx_len)].as_ref() == tx.as_ref() {
if &existing[i .. (i + tx_len)] == tx.as_ref() {
return;
}
i += tx_len;