Skip to content

fix: get uxtos stall #6242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 19 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
### Changed

- Changed default mempool walk strategy to `NextNonceWithHighestFeeRate`
- When a previous block commit is unable to be RBFed, the miner will now just wait for it to be confirmed instead of submitting a new block commit which breaks the miner's UTXO chain.

### Fixed

Expand Down
9 changes: 9 additions & 0 deletions stacks-common/src/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ pub fn get_epoch_time_ms() -> u128 {
since_the_epoch.as_millis()
}

#[cfg(any(test, feature = "testing"))]
pub fn get_epoch_time_nanos() -> u128 {
let start = SystemTime::now();
let since_the_epoch = start
.duration_since(UNIX_EPOCH)
.expect("Time went backwards");
since_the_epoch.as_nanos()
}

pub fn sleep_ms(millis: u64) {
let t = time::Duration::from_millis(millis);
thread::sleep(t);
Expand Down
Loading
Loading