init initializes the worker with the configured settings
(workID uint8, s *TXPoolServer)
| 60 | |
| 61 | // init initializes the worker with the configured settings |
| 62 | func (worker *txPoolWorker) init(workID uint8, s *TXPoolServer) { |
| 63 | worker.rcvTXCh = make(chan *tx.Transaction, tc.MAX_PENDING_TXN) |
| 64 | worker.stfTxCh = make(chan *tx.Transaction, tc.MAX_PENDING_TXN) |
| 65 | worker.pendingTxList = make(map[common.Uint256]*pendingTx) |
| 66 | worker.rspCh = make(chan *types.CheckResponse, tc.MAX_PENDING_TXN) |
| 67 | worker.stopCh = make(chan bool) |
| 68 | worker.workId = workID |
| 69 | worker.server = s |
| 70 | } |
| 71 | |
| 72 | // GetTxStatus returns the status in the pending list with the transaction hash |
| 73 | func (worker *txPoolWorker) GetTxStatus(hash common.Uint256) *tc.TxStatus { |