refactor: remove unused opcode from StacksSubnetOp

This commit is contained in:
Brice Dobry
2023-03-13 11:42:18 -04:00
parent 2255e35252
commit 6af09fecc5
3 changed files with 1 additions and 16 deletions

View File

@@ -264,7 +264,6 @@ impl StacksSubnetOp {
txid,
event_index,
in_block: in_block.clone(),
opcode: 0,
event: StacksSubnetOpType::BlockCommit {
subnet_block_hash: BlockHeaderHash(block_commit),
withdrawal_merkle_root: Sha512Trunc256Sum(withdrawal_merkle_root),
@@ -309,7 +308,6 @@ impl StacksSubnetOp {
txid,
event_index,
in_block: in_block.clone(),
opcode: 6,
event: StacksSubnetOpType::RegisterAsset {
asset_type,
l1_contract_id,
@@ -334,7 +332,6 @@ impl StacksSubnetOp {
txid,
event_index,
in_block: in_block.clone(),
opcode: 1,
event: StacksSubnetOpType::DepositStx { amount, sender },
})
}
@@ -380,7 +377,6 @@ impl StacksSubnetOp {
txid,
event_index,
in_block: in_block.clone(),
opcode: 2,
event: StacksSubnetOpType::DepositFt {
l1_contract_id,
subnet_contract_id,
@@ -428,7 +424,6 @@ impl StacksSubnetOp {
txid,
event_index,
in_block: in_block.clone(),
opcode: 3,
event: StacksSubnetOpType::DepositNft {
l1_contract_id,
subnet_contract_id,
@@ -454,7 +449,6 @@ impl StacksSubnetOp {
txid,
event_index,
in_block: in_block.clone(),
opcode: 1,
event: StacksSubnetOpType::WithdrawStx { amount, recipient },
})
}
@@ -489,7 +483,6 @@ impl StacksSubnetOp {
txid,
event_index,
in_block: in_block.clone(),
opcode: 4,
event: StacksSubnetOpType::WithdrawFt {
l1_contract_id,
name,
@@ -526,7 +519,6 @@ impl StacksSubnetOp {
txid,
event_index,
in_block: in_block.clone(),
opcode: 5,
event: StacksSubnetOpType::WithdrawNft {
l1_contract_id,
id,

View File

@@ -282,7 +282,6 @@ pub enum StacksSubnetOpType {
pub struct StacksSubnetOp {
pub txid: Txid,
pub in_block: StacksBlockId,
pub opcode: u8,
pub event_index: u32,
pub event: StacksSubnetOpType,
}
@@ -306,12 +305,6 @@ impl BurnchainTransaction {
}
}
pub fn opcode(&self) -> u8 {
match *self {
BurnchainTransaction::StacksBase(ref tx) => tx.opcode,
}
}
pub fn get_burn_amount(&self) -> u64 {
0
}

View File

@@ -3195,7 +3195,7 @@ impl<'a> SortitionHandleTx<'a> {
Ok(())
}
/// Insert a deposit ft op
/// Insert a register asset op
fn insert_register_asset(
&mut self,
op: &RegisterAssetOp,