Skip to content

Commit

Permalink
[node] fix: do not ignore tx when out of sync (harmony-one#4278)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMustermann2 authored Sep 2, 2022
1 parent c5a35d2 commit 205e641
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ func (node *Node) tryBroadcastStaking(stakingTx *staking.StakingTransaction) {

// Add new transactions to the pending transaction list.
func (node *Node) addPendingTransactions(newTxs types.Transactions) []error {
if inSync, _, _ := node.SyncStatus(node.Blockchain().ShardID()); !inSync && node.NodeConfig.GetNetworkType() == nodeconfig.Mainnet {
utils.Logger().Debug().
Int("length of newTxs", len(newTxs)).
Msg("[addPendingTransactions] Node out of sync, ignoring transactions")
return nil
}
// if inSync, _, _ := node.SyncStatus(node.Blockchain().ShardID()); !inSync && node.NodeConfig.GetNetworkType() == nodeconfig.Mainnet {
// utils.Logger().Debug().
// Int("length of newTxs", len(newTxs)).
// Msg("[addPendingTransactions] Node out of sync, ignoring transactions")
// return nil
// }

// in tikv mode, reader only accept the pending transaction from writer node, ignore the p2p message
if node.HarmonyConfig.General.RunElasticMode && node.HarmonyConfig.TiKV.Role == tikv.RoleReader {
Expand Down

0 comments on commit 205e641

Please sign in to comment.