Rename timestamp module to time
We just re-named `Timestamp` to `BlockTime`. We have a `units::block` module but it currently holds abstractions (`BlockHeight` and `BlockInterval`) that are not onchain abstractions and therefore somewhat different from the `BlockTime`. Instead of making `block` a block 'utils' module instead re-name the `timestamp` module to `time`.
This commit is contained in:
parent
e2dee4900f
commit
c707b959b7
|
@ -135,7 +135,7 @@ pub use units::{
|
|||
amount::{Amount, Denomination, SignedAmount},
|
||||
block::{BlockHeight, BlockInterval},
|
||||
fee_rate::FeeRate,
|
||||
timestamp::{self, BlockTime},
|
||||
time::{self, BlockTime},
|
||||
weight::Weight,
|
||||
};
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ pub use units::{
|
|||
amount::{self, Amount, SignedAmount},
|
||||
block::{BlockHeight, BlockInterval},
|
||||
fee_rate::{self, FeeRate},
|
||||
timestamp::{self, BlockTime},
|
||||
time::{self, BlockTime},
|
||||
weight::{self, Weight},
|
||||
};
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ pub mod block;
|
|||
pub mod fee_rate;
|
||||
pub mod locktime;
|
||||
pub mod parse;
|
||||
pub mod timestamp;
|
||||
pub mod time;
|
||||
pub mod weight;
|
||||
|
||||
#[doc(inline)]
|
||||
|
@ -43,6 +43,6 @@ pub use self::{
|
|||
amount::{Amount, SignedAmount},
|
||||
block::{BlockHeight, BlockInterval},
|
||||
fee_rate::FeeRate,
|
||||
timestamp::BlockTime,
|
||||
time::BlockTime,
|
||||
weight::Weight
|
||||
};
|
||||
|
|
|
@ -141,7 +141,7 @@ struct Errors {
|
|||
|
||||
#[test]
|
||||
fn api_can_use_modules_from_crate_root() {
|
||||
use bitcoin_units::{amount, block, fee_rate, locktime, parse, timestamp, weight};
|
||||
use bitcoin_units::{amount, block, fee_rate, locktime, parse, time, weight};
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -189,8 +189,8 @@ fn api_can_use_all_types_from_module_parse() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn api_can_use_all_types_from_module_timestamp() {
|
||||
use bitcoin_units::timestamp::BlockTime;
|
||||
fn api_can_use_all_types_from_module_time() {
|
||||
use bitcoin_units::time::BlockTime;
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in New Issue