MCPcopy Create free account
hub / github.com/DNAProject/DNA / init

Method init

txnpool/proc/txnpool_worker.go:62–70  ·  view source on GitHub ↗

init initializes the worker with the configured settings

(workID uint8, s *TXPoolServer)

Source from the content-addressed store, hash-verified

60
61// init initializes the worker with the configured settings
62func (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
73func (worker *txPoolWorker) GetTxStatus(hash common.Uint256) *tc.TxStatus {

Callers 1

TestWorkerFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestWorkerFunction · 0.76