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},
|
amount::{Amount, Denomination, SignedAmount},
|
||||||
block::{BlockHeight, BlockInterval},
|
block::{BlockHeight, BlockInterval},
|
||||||
fee_rate::FeeRate,
|
fee_rate::FeeRate,
|
||||||
timestamp::{self, BlockTime},
|
time::{self, BlockTime},
|
||||||
weight::Weight,
|
weight::Weight,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ pub use units::{
|
||||||
amount::{self, Amount, SignedAmount},
|
amount::{self, Amount, SignedAmount},
|
||||||
block::{BlockHeight, BlockInterval},
|
block::{BlockHeight, BlockInterval},
|
||||||
fee_rate::{self, FeeRate},
|
fee_rate::{self, FeeRate},
|
||||||
timestamp::{self, BlockTime},
|
time::{self, BlockTime},
|
||||||
weight::{self, Weight},
|
weight::{self, Weight},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ pub mod block;
|
||||||
pub mod fee_rate;
|
pub mod fee_rate;
|
||||||
pub mod locktime;
|
pub mod locktime;
|
||||||
pub mod parse;
|
pub mod parse;
|
||||||
pub mod timestamp;
|
pub mod time;
|
||||||
pub mod weight;
|
pub mod weight;
|
||||||
|
|
||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
|
@ -43,6 +43,6 @@ pub use self::{
|
||||||
amount::{Amount, SignedAmount},
|
amount::{Amount, SignedAmount},
|
||||||
block::{BlockHeight, BlockInterval},
|
block::{BlockHeight, BlockInterval},
|
||||||
fee_rate::FeeRate,
|
fee_rate::FeeRate,
|
||||||
timestamp::BlockTime,
|
time::BlockTime,
|
||||||
weight::Weight
|
weight::Weight
|
||||||
};
|
};
|
||||||
|
|
|
@ -141,7 +141,7 @@ struct Errors {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn api_can_use_modules_from_crate_root() {
|
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]
|
#[test]
|
||||||
|
@ -189,8 +189,8 @@ fn api_can_use_all_types_from_module_parse() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn api_can_use_all_types_from_module_timestamp() {
|
fn api_can_use_all_types_from_module_time() {
|
||||||
use bitcoin_units::timestamp::BlockTime;
|
use bitcoin_units::time::BlockTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Reference in New Issue