bitcoindevkit / bitcoindevkit/bdk_wallet

adding type aliases for the block height and unix time instead of just using a `u32` and `u64`

Open
#147 15 comments 1 reaction 1 assignee Claimed by @luisschwab View on GitHub
api
Dominant language
Rust
Stars
59
Forks
105
Avg merge
10d 9h
Merged PRs (30d)
1

Description

A little off-topic for this PR, but how'd you'all feel about adding type aliases for the block height and unix time instead of just using a `u32` and `u64`? It would make the code easier to read and I don't think there are any drawbacks. Could put them in `chain/src/lib.rs`.

```rust
// The bitcoin block height, 0 is the genesis block.
pub type BlockHeight = u32;

// Number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, the Unix epoch.
pub type UnixSeconds = u64;
```

_Originally posted by @notmandatory in https://github.com/bitcoindevkit/bdk/issues/1002#issuecomment-1602955088_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.