mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2024-11-20 15:05:19 +00:00
Fix a possible log sync break after a node restarts. (#34)
* Fix a possible log sync break after a node restarts. * Skip `sync_blocks` in blockchain node setup.
This commit is contained in:
parent
f9ce286909
commit
588bf39d7d
@ -373,8 +373,10 @@ impl LogSyncManager {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if let Err(e) = self.event_send.send(LogSyncEvent::TxSynced { tx }) {
|
if let Err(e) = self.event_send.send(LogSyncEvent::TxSynced { tx }) {
|
||||||
error!("log sync broadcast error, error={:?}", e);
|
// TODO: Do we need to wait until all receivers are initialized?
|
||||||
break;
|
// Auto-sync and txpool may need this event, but it's possible that
|
||||||
|
// no receivers will be created.
|
||||||
|
warn!("log sync broadcast error, error={:?}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LogFetchProgress::Reverted(reverted) => {
|
LogFetchProgress::Reverted(reverted) => {
|
||||||
|
@ -138,7 +138,9 @@ class TestFramework:
|
|||||||
# make nodes full connected
|
# make nodes full connected
|
||||||
if self.num_blockchain_nodes > 1:
|
if self.num_blockchain_nodes > 1:
|
||||||
connect_sample_nodes(self.blockchain_nodes, self.log)
|
connect_sample_nodes(self.blockchain_nodes, self.log)
|
||||||
sync_blocks(self.blockchain_nodes)
|
# The default is `dev` mode with auto mining, so it's not guaranteed that blocks
|
||||||
|
# can be synced in time for `sync_blocks` to pass.
|
||||||
|
# sync_blocks(self.blockchain_nodes)
|
||||||
|
|
||||||
contract, tx_hash, mine_contract, reward_contract = self.blockchain_nodes[0].setup_contract(self.enable_market, self.mine_period)
|
contract, tx_hash, mine_contract, reward_contract = self.blockchain_nodes[0].setup_contract(self.enable_market, self.mine_period)
|
||||||
self.contract = FlowContractProxy(contract, self.blockchain_nodes)
|
self.contract = FlowContractProxy(contract, self.blockchain_nodes)
|
||||||
|
Loading…
Reference in New Issue
Block a user