Skip to content

Commit

Permalink
reload tree (#1019)
Browse files Browse the repository at this point in the history
Co-authored-by: shaorongqiang <[email protected]>
  • Loading branch information
shaorongqiang and shaorongqiang authored Oct 10, 2023
1 parent f7d9f1a commit 8644797
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 16 deletions.
7 changes: 6 additions & 1 deletion src/components/abciapp/src/abci/server/callback/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
//! # Impl function of tendermint ABCI
//!

use fp_storage::BorrowMut;

mod utils;

use {
Expand Down Expand Up @@ -614,7 +616,10 @@ pub fn commit(s: &mut ABCISubmissionServer, req: &RequestCommit) -> ResponseComm

IN_SAFE_ITV.store(false, Ordering::Release);
if let Some(eth_api_base_app) = &s.eth_api_base_app {
pnk!(eth_api_base_app.write().secondary_catch_up_primary());
pnk!(eth_api_base_app
.write()
.borrow_mut()
.secondary_catch_up_primary());
}

if CFG.enable_enterprise_web3 && td_height as u64 > *WEB3_SERVICE_START_HEIGHT {
Expand Down
4 changes: 2 additions & 2 deletions src/components/contracts/baseapp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ protobuf = "2.16"
ruc = "1.0"
serde = {version = "1.0.124", features = ["derive"]}
serde_json = "1.0.40"
storage = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.7" }
fin_db = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.7" }
storage = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.8" }
fin_db = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.8" }
sha3 = "0.8"
zei = { git = "https://github.com/FindoraNetwork/zei", branch = "stable-main" }

Expand Down
8 changes: 5 additions & 3 deletions src/components/contracts/baseapp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,15 @@ impl BaseApp {
event_notify: Arc::new(Notifications::new()),
})
}
pub fn secondary_catch_up_primary(&self) -> Result<()> {
pub fn secondary_catch_up_primary(&mut self) -> Result<()> {
self.chain_state
.read()
.write()
.borrow_mut()
.secondary_catch_up_primary()
.map_err(|e| eg!("chain_state secondary_catch_up_primary fail:{}", e))?;
self.chain_db
.read()
.write()
.borrow_mut()
.secondary_catch_up_primary()
.map_err(|e| eg!("chain_db secondary_catch_up_primary fail:{}", e))
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/contracts/modules/account/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ primitive-types = { version = "0.11.1", default-features = false, features = ["r
ruc = "1.0"
serde = { version = "1.0.124", features = ["derive"] }
serde_json = "1.0.64"
storage = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.7" }
storage = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.8" }

# primitives, don't depend on any modules
fp-core = { path = "../../primitives/core" }
Expand All @@ -29,4 +29,4 @@ config = { path = "../../../config"}
rand_chacha = "0.2"
parking_lot = "0.12"
zei = { git = "https://github.com/FindoraNetwork/zei", branch = "stable-main" }
fin_db = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.7" }
fin_db = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.8" }
4 changes: 2 additions & 2 deletions src/components/contracts/modules/ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ enterprise-web3 = { path = "../../primitives/enterprise-web3" }
baseapp = { path = "../../baseapp" }
fp-mocks = { path = "../../primitives/mocks" }
module-account = { path = "../account" }
storage = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.7" }
fin_db = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.7" }
storage = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.8" }
fin_db = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.8" }

[features]
default = []
Expand Down
4 changes: 2 additions & 2 deletions src/components/contracts/modules/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ fp-traits = { path = "../../primitives/traits" }
fp-types = { path = "../../primitives/types" }
fp-utils = { path = "../../primitives/utils" }
config = { path = "../../../config"}
storage = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.7" }
fin_db = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.7" }
storage = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.8" }
fin_db = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.8" }
ledger = { path = "../../../../ledger" }
enterprise-web3 = { path = "../../primitives/enterprise-web3" }
module-ethereum = { path = "../ethereum" }
Expand Down
4 changes: 2 additions & 2 deletions src/components/contracts/primitives/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ parking_lot = "0.12"
primitive-types = { version = "0.11.1", default-features = false, features = ["rlp", "byteorder", "serde"] }
ruc = "1.0"
serde = { version = "1.0.124", features = ["derive"] }
storage = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.7", optional = true }
fin_db = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.7", optional = true }
storage = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.8", optional = true }
fin_db = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.8", optional = true }
serde_with = { version = "1.9.4"}

# primitives
Expand Down
4 changes: 2 additions & 2 deletions src/components/contracts/primitives/storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ ruc = "1.0"
serde = { version = "1.0.124", features = ["derive"] }
serde_json = "1.0"
sha2 = "0.9.5"
storage = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.7" }
storage = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.8" }

# primitives
fp-core = { path = "../core" }
config = { path = "../../../config"}

[dev-dependencies]
temp_db = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.7" }
temp_db = { git = "https://github.com/FindoraNetwork/storage.git", tag = "v1.1.8" }

0 comments on commit 8644797

Please sign in to comment.