Merge pull request #1605 from rlan35/cx_hotfix

Enable receipt processing for mainnet
pull/1616/head
Rongjian Lan 5 years ago committed by GitHub
commit 36876f5622
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      node/node.go

@ -290,12 +290,10 @@ func (node *Node) AddPendingTransaction(newTx *types.Transaction) {
// AddPendingReceipts adds one receipt message to pending list.
func (node *Node) AddPendingReceipts(receipts *types.CXReceiptsProof) {
if node.NodeConfig.GetNetworkType() != nodeconfig.Mainnet {
node.pendingCXMutex.Lock()
node.pendingCXReceipts = append(node.pendingCXReceipts, receipts)
node.pendingCXMutex.Unlock()
utils.Logger().Error().Int("totalPendingReceipts", len(node.pendingCXReceipts)).Msg("Got ONE more receipt message")
}
node.pendingCXMutex.Lock()
node.pendingCXReceipts = append(node.pendingCXReceipts, receipts)
node.pendingCXMutex.Unlock()
utils.Logger().Error().Int("totalPendingReceipts", len(node.pendingCXReceipts)).Msg("Got ONE more receipt message")
}
// Take out a subset of valid transactions from the pending transaction list

Loading…
Cancel
Save