Address PR feedback in pox_4.rs

This commit is contained in:
Jeff Bencin
2023-12-11 14:43:54 -05:00
committed by jbencin
parent 1c5d743a3b
commit 2d3fbc8425
4 changed files with 7 additions and 9 deletions

View File

@@ -342,7 +342,7 @@ fn create_event_info_data_code(function_name: &str, args: &[Value]) -> String {
/// Synthesize an events data tuple to return on the successful execution of a pox-2 or pox-3 stacking
/// function. It runs a series of Clarity queries against the PoX contract's data space (including
/// calling PoX functions).
pub fn synthesize_pox_2_or_3_event_info(
pub fn synthesize_pox_event_info(
global_context: &mut GlobalContext,
contract_id: &QualifiedContractIdentifier,
sender_opt: Option<&PrincipalData>,

View File

@@ -26,7 +26,7 @@ use clarity::vm::{Environment, Value};
use slog::{slog_debug, slog_error};
use stacks_common::{debug, error};
use crate::events::synthesize_pox_2_or_3_event_info;
use crate::events::synthesize_pox_event_info;
use crate::LockingError;
/// is a PoX-2 function call read only?
@@ -478,7 +478,7 @@ pub fn handle_contract_call(
// for some reason.
// Failure to synthesize an event due to a bug is *NOT* an excuse to crash the whole
// network! Event capture is not consensus-critical.
let event_info_opt = match synthesize_pox_2_or_3_event_info(
let event_info_opt = match synthesize_pox_event_info(
global_context,
contract_id,
sender_opt,

View File

@@ -26,7 +26,7 @@ use clarity::vm::{Environment, Value};
use slog::{slog_debug, slog_error};
use stacks_common::{debug, error};
use crate::events::synthesize_pox_2_or_3_event_info;
use crate::events::synthesize_pox_event_info;
// Note: PoX-3 uses the same contract-call result parsing routines as PoX-2
use crate::pox_2::{parse_pox_extend_result, parse_pox_increase, parse_pox_stacking_result};
use crate::{LockingError, POX_3_NAME};
@@ -360,7 +360,7 @@ pub fn handle_contract_call(
// for some reason.
// Failure to synthesize an event due to a bug is *NOT* an excuse to crash the whole
// network! Event capture is not consensus-critical.
let event_info_opt = match synthesize_pox_2_or_3_event_info(
let event_info_opt = match synthesize_pox_event_info(
global_context,
contract_id,
sender_opt,

View File

@@ -26,7 +26,7 @@ use clarity::vm::{Environment, Value};
use slog::{slog_debug, slog_error};
use stacks_common::{debug, error};
use crate::events::synthesize_pox_2_or_3_event_info;
use crate::events::synthesize_pox_event_info;
// Note: PoX-4 uses the same contract-call result parsing routines as PoX-2
use crate::pox_2::{parse_pox_extend_result, parse_pox_increase, parse_pox_stacking_result};
use crate::{LockingError, POX_4_NAME};
@@ -150,8 +150,6 @@ pub fn pox_lock_increase_v4(
Ok(out_balance)
}
/////////////// PoX-4 //////////////////////////////////////////
/// Handle responses from stack-stx and delegate-stack-stx in pox-4 -- functions that *lock up* STX
fn handle_stack_lockup_pox_v4(
global_context: &mut GlobalContext,
@@ -340,7 +338,7 @@ pub fn handle_contract_call(
// for some reason.
// Failure to synthesize an event due to a bug is *NOT* an excuse to crash the whole
// network! Event capture is not consensus-critical.
let event_info_opt = match synthesize_pox_2_or_3_event_info(
let event_info_opt = match synthesize_pox_event_info(
global_context,
contract_id,
sender_opt,