Skip to content

Commit 8d55bf6

Browse files
fixes
1 parent 604117e commit 8d55bf6

File tree

6 files changed

+15
-11
lines changed
  • packages
    • rs-drive-abci/tests/strategy_tests
    • rs-drive/src
      • drive/identity/withdrawals/transaction/queue/move_broadcasted_withdrawal_transactions_back_to_queue_operations/v0
      • util/grove_operations
    • rs-platform-version/src/version

6 files changed

+15
-11
lines changed

packages/rs-drive-abci/tests/strategy_tests/withdrawal_tests.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -790,15 +790,13 @@ mod tests {
790790
.expect_send_raw_transaction()
791791
.returning(move |_| Ok(Txid::all_zeros()));
792792

793-
let mut chain_locked_height = 1;
794-
795793
// Have to go with a complicated shared object for the core state because we need to change
796794
// rpc response along the way but we can't mutate `platform.core_rpc` later
797795
// because platform reference is moved into the AbciApplication.
798796
let shared_core_state = Arc::new(Mutex::new(CoreState {
799797
asset_unlock_statuses: BTreeMap::new(),
800798
chain_lock: ChainLock {
801-
block_height: chain_locked_height,
799+
block_height: 1,
802800
block_hash: BlockHash::from_byte_array([1; 32]),
803801
signature: BLSSignature::from([2; 96]),
804802
},

packages/rs-drive/src/drive/identity/withdrawals/transaction/queue/move_broadcasted_withdrawal_transactions_back_to_queue_operations/v0/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ impl Drive {
1010
drive_operation_types: &mut Vec<DriveOperation>,
1111
) {
1212
if !indexes.is_empty() {
13+
tracing::trace!(
14+
"Moving {} broadcasted withdrawal transactions back to the queue for resigning: {:?}",
15+
indexes.len(),
16+
indexes
17+
);
1318
drive_operation_types.push(DriveOperation::WithdrawalOperation(
1419
WithdrawalOperationType::MoveBroadcastedWithdrawalTransactionsBackToQueueForResigning {
1520
indexes,

packages/rs-drive/src/util/grove_operations/batch_move_items_in_path_query/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::drive::Drive;
44
use crate::error::drive::DriveError;
55
use crate::error::Error;
66
use crate::fees::op::LowLevelDriveOperation;
7-
use crate::util::grove_operations::{BatchDeleteApplyType, BatchMoveApplyType};
7+
use crate::util::grove_operations::BatchMoveApplyType;
88

99
use dpp::version::drive_versions::DriveVersion;
1010

@@ -37,7 +37,7 @@ impl Drive {
3737
match drive_version
3838
.grove_methods
3939
.batch
40-
.batch_delete_items_in_path_query
40+
.batch_move_items_in_path_query
4141
{
4242
0 => self.batch_move_items_in_path_query_v0(
4343
path_query,

packages/rs-drive/src/util/grove_operations/batch_move_items_in_path_query/v0/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ impl Drive {
3939
drive_version: &DriveVersion,
4040
) -> Result<(), Error> {
4141
if path_query.query.limit == None {
42-
Error::Drive(DriveError::NotSupported(
42+
return Err(Error::Drive(DriveError::NotSupported(
4343
"Limits are required for path_query",
44-
));
44+
)));
4545
}
4646
let query_result = if path_query
4747
.query

packages/rs-drive/src/util/grove_operations/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ pub enum BatchDeleteApplyType {
180180
StatelessBatchDelete {
181181
/// Are we deleting in a sum tree
182182
is_sum_tree: bool,
183-
/// What is the estimated value size
183+
/// What is the estimated key size
184184
estimated_key_size: u32,
185185
/// What is the estimated value size
186186
estimated_value_size: u32,
@@ -197,11 +197,11 @@ pub enum BatchDeleteApplyType {
197197
pub enum BatchMoveApplyType {
198198
/// Stateless batch move
199199
StatelessBatchMove {
200-
/// Does this tree use sums?
200+
/// Are we moving from inside a sum tree
201201
in_tree_using_sums: bool,
202-
/// Are we deleting in a sum tree
202+
/// Are we moving a sum tree
203203
is_sum_tree: bool,
204-
/// What is the estimated value size
204+
/// What is the estimated key size
205205
estimated_key_size: u32,
206206
/// What is the estimated value size
207207
estimated_value_size: u32,

packages/rs-platform-version/src/version/drive_versions.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ pub struct DriveGroveBatchMethodVersions {
462462
pub batch_replace: FeatureVersion,
463463
pub batch_delete: FeatureVersion,
464464
pub batch_delete_items_in_path_query: FeatureVersion,
465+
pub batch_move_items_in_path_query: FeatureVersion,
465466
pub batch_remove_raw: FeatureVersion,
466467
pub batch_delete_up_tree_while_empty: FeatureVersion,
467468
pub batch_refresh_reference: FeatureVersion,

0 commit comments

Comments
 (0)