Skip to content

Commit

Permalink
chore: attend pr review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
guidiaz committed Jun 6, 2024
1 parent b26a88e commit 5ec6673
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions bridges/centralized-ethereum/src/actors/dr_sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ fn deserialize_and_validate_dr_bytes(
match DataRequestOutput::from_pb_bytes(dr_bytes) {
Err(e) => Err(DrSenderError::Deserialization { msg: e.to_string() }),
Ok(dr_output) => {
let mut dr_output = dr_output.clone();
let mut dr_output = dr_output;
validate_data_request_output(
&dr_output,
dr_min_collateral_nanowits, // dro_hash may be altered if dr_output.collateral goes below this value
Expand Down Expand Up @@ -343,9 +343,18 @@ fn deserialize_and_validate_dr_bytes(
dr_min_collateral_nanowits,
reward_collateral_ratio,
);
log::warn!("DRO [{}]: witnessing collateral ({}) increased to mininum ({})", dro_hash, dro_prev_collateral, dr_min_collateral_nanowits);
log::warn!("DRO [{}]: witnessing reward ({}) proportionally increased ({})", dro_hash, dro_prev_witness_reward, dr_output.witness_reward)

log::warn!(
"DRO [{}]: witnessing collateral ({}) increased to minimum ({})",
dro_hash,
dro_prev_collateral,
dr_min_collateral_nanowits
);
log::warn!(
"DRO [{}]: witnessing reward ({}) proportionally increased ({})",
dro_hash,
dro_prev_witness_reward,
dr_output.witness_reward
)
}
if (dr_output.collateral != 0) && (dr_output.collateral < dr_min_collateral_nanowits) {
return Err(DrSenderError::InvalidCollateral {
Expand Down

0 comments on commit 5ec6673

Please sign in to comment.