Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumExplorer committed Sep 30, 2024
1 parent 604117e commit 8d55bf6
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -790,15 +790,13 @@ mod tests {
.expect_send_raw_transaction()
.returning(move |_| Ok(Txid::all_zeros()));

let mut chain_locked_height = 1;

// Have to go with a complicated shared object for the core state because we need to change
// rpc response along the way but we can't mutate `platform.core_rpc` later
// because platform reference is moved into the AbciApplication.
let shared_core_state = Arc::new(Mutex::new(CoreState {
asset_unlock_statuses: BTreeMap::new(),
chain_lock: ChainLock {
block_height: chain_locked_height,
block_height: 1,
block_hash: BlockHash::from_byte_array([1; 32]),
signature: BLSSignature::from([2; 96]),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ impl Drive {
drive_operation_types: &mut Vec<DriveOperation>,
) {
if !indexes.is_empty() {
tracing::trace!(
"Moving {} broadcasted withdrawal transactions back to the queue for resigning: {:?}",
indexes.len(),
indexes
);
drive_operation_types.push(DriveOperation::WithdrawalOperation(
WithdrawalOperationType::MoveBroadcastedWithdrawalTransactionsBackToQueueForResigning {
indexes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::drive::Drive;
use crate::error::drive::DriveError;
use crate::error::Error;
use crate::fees::op::LowLevelDriveOperation;
use crate::util::grove_operations::{BatchDeleteApplyType, BatchMoveApplyType};
use crate::util::grove_operations::BatchMoveApplyType;

use dpp::version::drive_versions::DriveVersion;

Expand Down Expand Up @@ -37,7 +37,7 @@ impl Drive {
match drive_version
.grove_methods
.batch
.batch_delete_items_in_path_query
.batch_move_items_in_path_query
{
0 => self.batch_move_items_in_path_query_v0(
path_query,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ impl Drive {
drive_version: &DriveVersion,
) -> Result<(), Error> {
if path_query.query.limit == None {
Error::Drive(DriveError::NotSupported(
return Err(Error::Drive(DriveError::NotSupported(
"Limits are required for path_query",
));
)));
}
let query_result = if path_query
.query
Expand Down
8 changes: 4 additions & 4 deletions packages/rs-drive/src/util/grove_operations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ pub enum BatchDeleteApplyType {
StatelessBatchDelete {
/// Are we deleting in a sum tree
is_sum_tree: bool,
/// What is the estimated value size
/// What is the estimated key size
estimated_key_size: u32,
/// What is the estimated value size
estimated_value_size: u32,
Expand All @@ -197,11 +197,11 @@ pub enum BatchDeleteApplyType {
pub enum BatchMoveApplyType {
/// Stateless batch move
StatelessBatchMove {
/// Does this tree use sums?
/// Are we moving from inside a sum tree
in_tree_using_sums: bool,
/// Are we deleting in a sum tree
/// Are we moving a sum tree
is_sum_tree: bool,
/// What is the estimated value size
/// What is the estimated key size
estimated_key_size: u32,
/// What is the estimated value size
estimated_value_size: u32,
Expand Down
1 change: 1 addition & 0 deletions packages/rs-platform-version/src/version/drive_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ pub struct DriveGroveBatchMethodVersions {
pub batch_replace: FeatureVersion,
pub batch_delete: FeatureVersion,
pub batch_delete_items_in_path_query: FeatureVersion,
pub batch_move_items_in_path_query: FeatureVersion,
pub batch_remove_raw: FeatureVersion,
pub batch_delete_up_tree_while_empty: FeatureVersion,
pub batch_refresh_reference: FeatureVersion,
Expand Down

0 comments on commit 8d55bf6

Please sign in to comment.