Skip to content

Commit b777396

Browse files
committed
Merge #1730: Check time when persisting in rusqlite impl
8ec9c0a fix(chain): check time when persisting (Rob N) Pull request description: Closes #1713 Any implementation overflowing the `i64` type would be clearly faulty, so I just pass up the error if the conversion fails. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### New Features: * [ ] I've added tests for the new feature * [ ] I've added docs for the new feature #### Bugfixes: * [ ] This pull request breaks the existing API * [ ] I've added tests to reproduce the issue which are now passing * [ ] I'm linking the issue being fixed by this PR ACKs for top commit: notmandatory: ACK 8ec9c0a oleonardolima: utACK 8ec9c0a Tree-SHA512: ded7c036f7a082e181e52f0366410f572227d57af37fdfd0fc0909f629a48ad1ed69f5c8549c45fe6c7aadb7e3fa62d2b56990028bc7fd321e43d39b79d77b00
2 parents e7e552c + 8ec9c0a commit b777396

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/chain/src/rusqlite_impl.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,10 @@ where
352352
Self::TXS_TABLE_NAME,
353353
))?;
354354
for (&txid, &last_seen) in &self.last_seen {
355+
let checked_time = last_seen.to_sql()?;
355356
statement.execute(named_params! {
356357
":txid": Impl(txid),
357-
":last_seen": Some(last_seen),
358+
":last_seen": Some(checked_time),
358359
})?;
359360
}
360361

0 commit comments

Comments
 (0)