From 0156463be3ed2c01bdf6a24952eee8c2b9d322ba Mon Sep 17 00:00:00 2001 From: Ed Hastings Date: Wed, 6 Mar 2024 11:40:34 -0800 Subject: [PATCH] feedback --- execution_engine/src/runtime/mod.rs | 1 - node/src/components/contract_runtime/operations.rs | 7 +++++-- storage/src/system/auction/detail.rs | 2 +- types/src/package.rs | 11 ++++++----- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/execution_engine/src/runtime/mod.rs b/execution_engine/src/runtime/mod.rs index c96e8caa8f..0a1bc2bd8b 100644 --- a/execution_engine/src/runtime/mod.rs +++ b/execution_engine/src/runtime/mod.rs @@ -938,7 +938,6 @@ where self.context.engine_config().max_delegators_per_validator(); let minimum_delegation_amount = self.context.engine_config().minimum_delegation_amount(); - println!("A"); runtime .run_auction( era_end_timestamp_millis, diff --git a/node/src/components/contract_runtime/operations.rs b/node/src/components/contract_runtime/operations.rs index 7b9a30b6e4..bbd2e2a0ab 100644 --- a/node/src/components/contract_runtime/operations.rs +++ b/node/src/components/contract_runtime/operations.rs @@ -195,13 +195,16 @@ pub fn execute_finalized_block( continue; } TransferResult::Success { - effects, transfers, .. + effects: transfer_effects, + transfers, + .. } => { + effects.append(transfer_effects.clone()); let artifact = ExecutionArtifact::new( transaction_hash, transaction.header(), ExecutionResult::V2(ExecutionResultV2::Success { - effects, + effects: transfer_effects, cost: U512::zero(), transfers, }), diff --git a/storage/src/system/auction/detail.rs b/storage/src/system/auction/detail.rs index 3adb6f64cb..38b8a1d869 100644 --- a/storage/src/system/auction/detail.rs +++ b/storage/src/system/auction/detail.rs @@ -454,7 +454,6 @@ where max_delegators_per_validator, minimum_delegation_amount, ); - println!("{:?}", redelegation); match redelegation { Ok(_) => Ok(UnbondRedelegationOutcome::SuccessfullyRedelegated), Err(ApiError::AuctionError(err)) if err == Error::BondTooSmall as u8 => { @@ -514,6 +513,7 @@ where let delegator_count = provider.delegator_count(&validator_bid_addr)?; if delegator_count >= max_delegators_per_validator as usize { warn!( + %delegator_count, %max_delegators_per_validator, "delegator_count {}, max_delegators_per_validator {}", delegator_count, max_delegators_per_validator ); diff --git a/types/src/package.rs b/types/src/package.rs index c9757461a0..9da3492e9b 100644 --- a/types/src/package.rs +++ b/types/src/package.rs @@ -1080,11 +1080,12 @@ mod tests { !package.is_entity_enabled(&ENTITY_HASH), "entity should be disabled" ); - assert_eq!( - package.lookup_entity_hash(next_version), - None, - "should not return disabled entity version" - ); + // This was once true, but look up vs disable checking have been decoupled in 2.0 + // assert_eq!( + // package.lookup_entity_hash(next_version), + // None, + // "should not return disabled entity version" + // ); assert!( !package.is_version_enabled(next_version), "version should not be enabled"