Skip to content

Commit ca885d0

Browse files
committed
chore: address review comments
1 parent 120348a commit ca885d0

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

testnet/stacks-node/src/burnchains/bitcoin_regtest_controller.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,7 +1721,7 @@ impl BitcoinRegtestController {
17211721
&addr2str(&addr),
17221722
epoch_id
17231723
);
1724-
return Err(BurnchainControllerError::NoUtxos);
1724+
return Err(BurnchainControllerError::NoUTXOs);
17251725
}
17261726
};
17271727
utxos
@@ -1941,7 +1941,7 @@ impl BitcoinRegtestController {
19411941
})
19421942
.map_err(|e| {
19431943
error!("Bitcoin RPC error: transaction submission failed - {:?}", e);
1944-
BurnchainControllerError::TransactionSubmissionFailed
1944+
BurnchainControllerError::TransactionSubmissionFailed(format!("{:?}", e))
19451945
})
19461946
}
19471947

testnet/stacks-node/src/burnchains/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ pub enum Error {
2222
BurnchainError,
2323
MaxFeeRateExceeded,
2424
IdenticalOperation,
25-
NoUtxos,
26-
TransactionSubmissionFailed,
25+
NoUTXOs,
26+
TransactionSubmissionFailed(String),
2727
SerializerError,
2828
}
2929

@@ -35,8 +35,10 @@ impl fmt::Display for Error {
3535
Error::BurnchainError => write!(f, "Burnchain error"),
3636
Error::MaxFeeRateExceeded => write!(f, "Max fee rate exceeded"),
3737
Error::IdenticalOperation => write!(f, "Identical operation, not submitting"),
38-
Error::NoUtxos => write!(f, "No UTXOs available"),
39-
Error::TransactionSubmissionFailed => write!(f, "Transaction submission failed"),
38+
Error::NoUTXOs => write!(f, "No UTXOs available"),
39+
Error::TransactionSubmissionFailed(e) => {
40+
write!(f, "Transaction submission failed: {e}")
41+
}
4042
Error::SerializerError => write!(f, "Serializer error"),
4143
}
4244
}

testnet/stacks-node/src/nakamoto_node.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ use stacks_common::types::StacksEpochId;
3333

3434
use super::{Config, EventDispatcher, Keychain};
3535
use crate::burnchains::bitcoin_regtest_controller::addr2str;
36+
use crate::burnchains::Error as BurnchainsError;
3637
use crate::neon_node::{LeaderKeyRegistrationState, StacksNode as NeonNode};
3738
use crate::run_loop::boot_nakamoto::Neon2NakaData;
3839
use crate::run_loop::nakamoto::{Globals, RunLoop};
@@ -93,7 +94,7 @@ pub enum Error {
9394
/// Something unexpected happened (e.g., hash mismatches)
9495
UnexpectedChainState,
9596
/// A burnchain operation failed when submitting it to the burnchain
96-
BurnchainSubmissionFailed,
97+
BurnchainSubmissionFailed(BurnchainsError),
9798
/// A new parent has been discovered since mining started
9899
NewParentDiscovered,
99100
/// A failure occurred while constructing a VRF Proof

testnet/stacks-node/src/nakamoto_node/relayer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ impl RelayerThread {
10501050
)
10511051
.map_err(|e| {
10521052
warn!("Failed to submit block-commit bitcoin transaction: {}", e);
1053-
NakamotoNodeError::BurnchainSubmissionFailed
1053+
NakamotoNodeError::BurnchainSubmissionFailed(e)
10541054
})?;
10551055

10561056
info!(

0 commit comments

Comments
 (0)