Skip to content

Commit

Permalink
add merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzhhuang committed Nov 17, 2023
1 parent 4ecc3a5 commit 1cef501
Show file tree
Hide file tree
Showing 50 changed files with 825 additions and 789 deletions.
46 changes: 45 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ starcoin-parallel-executor = { path = "vm/parallel-executor" }
starcoin-transaction-benchmarks = { path = "vm/transaction-benchmarks" }
starcoin-language-e2e-tests = { path = "vm/e2e-tests" }
starcoin-proptest-helpers = { path = "vm/proptest-helpers" }
flexidag = { path ="flexidag" }
starcoin-flexidag = { path = "flexidag" }
flexidag-service = { path ="flexidag/service" }
syn = { version = "1.0.107", features = [
"full",
Expand Down
6 changes: 1 addition & 5 deletions block-relayer/src/block_relayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,7 @@ impl BlockRelayer {
)
.await?;

block_connector_service.notify(PeerNewBlock::new(
peer_id,
block,
compact_block_msg.message.tips_hash,
))?;
block_connector_service.notify(PeerNewBlock::new(peer_id, block))?;
}
Ok(())
};
Expand Down
1 change: 1 addition & 0 deletions chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ starcoin-vm-types = { workspace = true }
starcoin-storage = { workspace = true }
thiserror = { workspace = true }
starcoin-network-rpc-api = { workspace = true }
async-std = { workspace = true }

[dev-dependencies]
proptest = { workspace = true }
Expand Down
1 change: 0 additions & 1 deletion chain/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ thiserror = { workspace = true }
starcoin-network-rpc-api = { workspace = true }
starcoin-config = { workspace = true }


[dev-dependencies]

[features]
Expand Down
14 changes: 0 additions & 14 deletions chain/api/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ pub trait ChainReader {
access_path: Option<AccessPath>,
) -> Result<Option<TransactionInfoWithProof>>;

/// get the current tips hash value
fn current_tips_hash(&self) -> Option<HashValue>;
fn net_id(&self) -> ChainNetworkID;
}

Expand All @@ -117,18 +115,6 @@ pub trait ChainWriter {
fn apply(&mut self, block: Block) -> Result<ExecutedBlock>;

fn chain_state(&mut self) -> &ChainStateDB;

/// Get the dag accumulator info
fn get_current_dag_accumulator_info(&self) -> Result<AccumulatorInfo>;

/// Fork the accumulator
fn fork_dag_accumulator(&mut self, accumulator_info: AccumulatorInfo) -> Result<()>;

/// Append the dag accumulator leaf
fn append_dag_accumulator_leaf(
&mut self,
tips: Vec<HashValue>,
) -> Result<(HashValue, AccumulatorInfo)>;
}

/// `Chain` is a trait that defines a single Chain.
Expand Down
2 changes: 1 addition & 1 deletion chain/chain-notify/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl EventHandler<Self, NewHeadBlock> for ChainNotifyHandlerService {
item: NewHeadBlock,
ctx: &mut ServiceContext<ChainNotifyHandlerService>,
) {
let NewHeadBlock(block_detail, _tips_hash) = item;
let NewHeadBlock(block_detail) = item;
let block = block_detail.block();
// notify header.
self.notify_new_block(block, ctx);
Expand Down
2 changes: 2 additions & 0 deletions chain/service/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[dependencies]
anyhow = { workspace = true }
async-std = { workspace = true }
async-trait = { workspace = true }
futures = { workspace = true }
rand = { workspace = true }
Expand All @@ -21,6 +22,7 @@ tokio = { workspace = true }
starcoin-network-rpc-api = { workspace = true }
starcoin-consensus = { workspace = true }
starcoin-accumulator = { package = "starcoin-accumulator", workspace = true }
starcoin-flexidag = { workspace = true }

[dev-dependencies]
stest = { workspace = true }
Expand Down
Loading

0 comments on commit 1cef501

Please sign in to comment.