You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The miner should be updating the contract with sBTC ops similar to the below code snippet:
for stack_stx_op in operations.into_iter(){letStackStxOp{
sender,
reward_addr,
stacked_ustx,
num_cycles,
block_height,
txid,
burn_header_hash,
..
} = &stack_stx_op;let result = clarity_tx.connection().as_transaction(|tx| {
tx.run_contract_call(&sender.clone().into(),None,&boot_code_id(active_pox_contract, mainnet),"stack-stx",&[Value::UInt(*stacked_ustx),// this .expect() should be unreachable since we coerce the hash mode when// we parse the StackStxOp from a burnchain transaction
reward_addr
.as_clarity_tuple().expect("FATAL: stack-stx operation has no hash mode").into(),Value::UInt(u128::from(*block_height)),Value::UInt(u128::from(*num_cycles)),],
|_, _| false,)});match result {Ok((value, _, events)) => {ifletValue::Response(ref resp) = value {if !resp.committed{debug!("StackStx burn op rejected by PoX contract.";"txid" => %txid,"burn_block" => %burn_header_hash,"contract_call_ecode" => %resp.data);}else{debug!("Processed StackStx burnchain op";"amount_ustx" => stacked_ustx,"num_cycles" => num_cycles,"burn_block_height" => block_height,"sender" => %sender,"reward_addr" => %reward_addr,"txid" => %txid);}letmut execution_cost = clarity_tx.cost_so_far();
execution_cost
.sub(&cost_so_far).expect("BUG: cost declined between executions");
The miner should be updating the contract with sBTC ops similar to the below code snippet:
Depends on #3958
The text was updated successfully, but these errors were encountered: