@@ -62,8 +62,8 @@ func errResp(code errCode, format string, v ...interface{}) error {
6262type ProtocolManager struct {
6363 networkId int
6464
65- fastSync uint32 // Flag whether fast sync is enabled (gets disabled if we already have blocks)
66- synced uint32 // Flag whether we're considered synchronised (enables transaction processing)
65+ fastSync uint32 // Flag whether fast sync is enabled (gets disabled if we already have blocks)
66+ acceptTxs uint32 // Flag whether we're considered synchronised (enables transaction processing)
6767
6868 txpool txPool
6969 blockchain * core.BlockChain
@@ -171,7 +171,7 @@ func NewProtocolManager(config *params.ChainConfig, fastSync bool, networkId int
171171 return blockchain .CurrentBlock ().NumberU64 ()
172172 }
173173 inserter := func (blocks types.Blocks ) (int , error ) {
174- atomic .StoreUint32 (& manager .synced , 1 ) // Mark initial sync done on any fetcher import
174+ atomic .StoreUint32 (& manager .acceptTxs , 1 ) // Mark initial sync done on any fetcher import
175175 return manager .blockchain .InsertChain (blocks )
176176 }
177177 manager .fetcher = fetcher .New (blockchain .GetBlockByHash , validator , manager .BroadcastBlock , heighter , inserter , manager .removePeer )
@@ -643,7 +643,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
643643
644644 case msg .Code == TxMsg :
645645 // Transactions arrived, make sure we have a valid and fresh chain to handle them
646- if atomic .LoadUint32 (& pm .synced ) == 0 {
646+ if atomic .LoadUint32 (& pm .acceptTxs ) == 0 {
647647 break
648648 }
649649 // Transactions can be processed, parse all of them and deliver to the pool
0 commit comments