mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2025-04-04 15:35:18 +00:00
Check zero contract root.
This commit is contained in:
parent
bc3a64ea80
commit
bbba73efb8
@ -519,9 +519,13 @@ impl LogSyncManager {
|
||||
.call()
|
||||
.await
|
||||
{
|
||||
Ok(contract_root) => match self.store.get_context() {
|
||||
Ok(contract_root_bytes) => {
|
||||
let contract_root = H256::from_slice(&contract_root_bytes);
|
||||
// contract_root is zero for tx submitted before upgrading.
|
||||
if !contract_root.is_zero() {
|
||||
match self.store.get_context() {
|
||||
Ok((local_root, _)) => {
|
||||
if H256::from_slice(&contract_root) != local_root {
|
||||
if contract_root != local_root {
|
||||
error!(
|
||||
?contract_root,
|
||||
?local_root,
|
||||
@ -533,7 +537,9 @@ impl LogSyncManager {
|
||||
Err(e) => {
|
||||
warn!(?e, "fail to read the local flow root");
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
warn!(?e, "fail to read the on-chain flow root");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user