mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Properly detect debug build in slots (#3630)
`debug-assertions` can also be enabled in for release builds. This introduces a new build-script that extracts the build type from the `PROFILE` env variable and sets the `build_type` cfg.
This commit is contained in:
@@ -209,7 +209,7 @@ pub trait SimpleSlotWorker<B: BlockT> {
|
||||
if slot_after_building != slot_number {
|
||||
info!("Discarding proposal for slot {}; block production took too long", slot_number);
|
||||
// If the node was compiled with debug, tell the user to use release optimizations.
|
||||
#[cfg(debug_assertions)]
|
||||
#[cfg(build_type="debug")]
|
||||
info!("Recompile your node in `--release` mode to mitigate this problem.");
|
||||
telemetry!(CONSENSUS_INFO; "slots.discarding_proposal_took_too_long";
|
||||
"slot" => slot_number,
|
||||
@@ -397,7 +397,7 @@ impl<T: Clone> SlotDuration<T> {
|
||||
Some(v) => <T as codec::Decode>::decode(&mut &v[..])
|
||||
.map(SlotDuration)
|
||||
.map_err(|_| {
|
||||
::client::error::Error::Backend({
|
||||
client::error::Error::Backend({
|
||||
error!(target: "slots", "slot duration kept in invalid format");
|
||||
format!("slot duration kept in invalid format")
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user