Skip to content

Commit

Permalink
Merge pull request #552 from jjyr/v0.9.x-remove-rollup-dep
Browse files Browse the repository at this point in the history
v0.9.x refactor: remove unused rollup cell dep
  • Loading branch information
Flouse authored Jan 14, 2022
2 parents 23fd3e6 + 91bb27f commit b44538a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions crates/block-producer/src/stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use ckb_types::{
use gw_config::ContractsCellDep;
use gw_rpc_client::rpc_client::RPCClient;
use gw_types::{
core::{DepType, ScriptHashType},
core::ScriptHashType,
offchain::{CellInfo, InputCellInfo, RollupContext},
packed::{CellDep, CellInput, CellOutput, L2Block, Script, StakeLockArgs},
prelude::{Pack, Unpack},
Expand All @@ -20,7 +20,7 @@ pub struct GeneratedStake {
}

pub async fn generate(
rollup_cell: &CellInfo,
_rollup_cell: &CellInfo,
rollup_context: &RollupContext,
block: &L2Block,
contracts_dep: &ContractsCellDep,
Expand Down Expand Up @@ -61,10 +61,6 @@ pub async fn generate(
.await?
{
let stake_lock_dep = contracts_dep.stake_cell_lock.clone();
let rollup_cell_dep = CellDep::new_builder()
.out_point(rollup_cell.out_point.to_owned())
.dep_type(DepType::Code.into())
.build();

let stake_cell = CellOutput::new_builder()
.capacity(unlocked_stake.output.capacity())
Expand All @@ -79,7 +75,7 @@ pub async fn generate(
};

let generated_stake = GeneratedStake {
deps: vec![stake_lock_dep.into(), rollup_cell_dep],
deps: vec![stake_lock_dep.into()],
inputs: vec![input_unlocked_stake],
output: stake_cell,
output_data: Bytes::new(),
Expand Down

0 comments on commit b44538a

Please sign in to comment.