bdk icon indicating copy to clipboard operation
bdk copied to clipboard

Replace u64 for unix epoch with Time and u32 for block height with Height

Open notmandatory opened this issue 1 year ago • 1 comments

Description

Replace instances of u64 for unix epoch with bitcoin::absolute::Time and u32 for block height with bitcoin::absolute::Height.

Fixes #1016

Notes to the reviewers

Instead of waiting for default implementations for Time and Height I used Time::MIN and Height::MIN. Once a default impl is available we should be able to use it internally without affecting our APIs.

Changelog notice

Change

  • Replace all instances of u64 for unix epoch with bitcoin::absolute::Time.
  • Replace all instances of u32 for block height with bitcoin::absolute::Height.

Checklists

All Submissions:

  • [ ] I've signed all my commits
  • [ ] I followed the contribution guidelines
  • [ ] 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

notmandatory avatar Mar 13 '24 01:03 notmandatory

This turned out to be a lot of changes, but at least I was able to do it without needing a default Time in rust-bitcoin.

Next commit I'll make the changes for Height.

notmandatory avatar Mar 13 '24 03:03 notmandatory

This has been removed from 1.0.0 so closing PR for now. May take it up for next major milestone.

notmandatory avatar Mar 24 '24 23:03 notmandatory