REVERT BEFORE USING: make BA today function, bridge_table public for testing
This commit is contained in:
parent
0e960d9156
commit
fd4f715ad9
|
@ -224,7 +224,7 @@ pub struct BridgeAuth {
|
||||||
pub bridgedb_pub: PublicKey,
|
pub bridgedb_pub: PublicKey,
|
||||||
|
|
||||||
/// The bridge table
|
/// The bridge table
|
||||||
bridge_table: BridgeTable,
|
pub bridge_table: BridgeTable,
|
||||||
|
|
||||||
/// The migration tables
|
/// The migration tables
|
||||||
trustup_migration_table: MigrationTable,
|
trustup_migration_table: MigrationTable,
|
||||||
|
@ -398,7 +398,7 @@ impl BridgeAuth {
|
||||||
self.time_offset += time::Duration::days(1);
|
self.time_offset += time::Duration::days(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
//#[cfg(test)]
|
||||||
/// For testing only: manually advance the day by the given number
|
/// For testing only: manually advance the day by the given number
|
||||||
/// of days
|
/// of days
|
||||||
pub fn advance_days(&mut self, days: u16) {
|
pub fn advance_days(&mut self, days: u16) {
|
||||||
|
@ -406,7 +406,7 @@ impl BridgeAuth {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get today's (real or simulated) date
|
/// Get today's (real or simulated) date
|
||||||
fn today(&self) -> u32 {
|
pub fn today(&self) -> u32 {
|
||||||
// We will not encounter negative Julian dates (~6700 years ago)
|
// We will not encounter negative Julian dates (~6700 years ago)
|
||||||
// or ones larger than 32 bits
|
// or ones larger than 32 bits
|
||||||
(time::OffsetDateTime::now_utc().date() + self.time_offset)
|
(time::OffsetDateTime::now_utc().date() + self.time_offset)
|
||||||
|
|
Loading…
Reference in New Issue