SendTransactions sends transactions to the peer and includes the hashes in its transaction hash set for future reference.
(txs types.Transactions)
| 189 | // SendTransactions sends transactions to the peer and includes the hashes |
| 190 | // in its transaction hash set for future reference. |
| 191 | func (p *peer) SendTransactions(txs types.Transactions) error { |
| 192 | for _, tx := range txs { |
| 193 | log.Debug("send tx", "tx", tx.Hash().Hex(), "remoteAddr", p.RemoteAddr().String()) |
| 194 | p.knownTxs.Add(tx.Hash()) |
| 195 | } |
| 196 | return p2p.Send(p.rw, TxMsg, txs) |
| 197 | } |
| 198 | |
| 199 | // AsyncSendTransactions queues list of transactions propagation to a remote |
| 200 | // peer. If the peer's broadcast queue is full, the event is silently dropped. |
no test coverage detected