Skip to content

Commit

Permalink
Improve debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Apr 20, 2021
1 parent faf01af commit 80e3e57
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/legacy_stake_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ impl LegacyStakePool {
)
})?.state
} else {
let memo = format!(
"Creating baseline stake account for validator {} ({})",
identity, baseline_stake_address
);
debug!("Adding transaction: {}", memo);

source_stake_lamports_required += self.baseline_stake_amount;
init_transactions.push((
Transaction::new_unsigned(Message::new(
Expand All @@ -170,10 +176,7 @@ impl LegacyStakePool {
),
Some(&authorized_staker),
)),
format!(
"Creating baseline stake account for validator {} ({})",
identity, baseline_stake_address
),
memo,
));
StakeActivationState::Inactive
};
Expand All @@ -193,6 +196,11 @@ impl LegacyStakePool {
})?
.state
} else {
let memo = format!(
"Creating bonus stake account for validator {} ({})",
identity, bonus_stake_address
);
debug!("Adding transaction: {}", memo);
source_stake_lamports_required += self.bonus_stake_amount;
init_transactions.push((
Transaction::new_unsigned(Message::new(
Expand All @@ -206,10 +214,7 @@ impl LegacyStakePool {
),
Some(&authorized_staker),
)),
format!(
"Creating bonus stake account for validator {} ({})",
identity, bonus_stake_address
),
memo,
));
StakeActivationState::Inactive
};
Expand Down

0 comments on commit 80e3e57

Please sign in to comment.