journalTx adds the specified transaction to the local disk journal if it is deemed to have been sent from a local account.
(from common.Address, tx *types.Transaction)
| 830 | // journalTx adds the specified transaction to the local disk journal if it is |
| 831 | // deemed to have been sent from a local account. |
| 832 | func (pool *TxPool) journalTx(from common.Address, tx *types.Transaction) { |
| 833 | // Only journal if it's enabled and the transaction is local |
| 834 | if pool.journal == nil || !pool.locals.contains(from) { |
| 835 | return |
| 836 | } |
| 837 | if err := pool.journal.insert(tx); err != nil { |
| 838 | log.Warn("Failed to journal local transaction", "err", err) |
| 839 | } |
| 840 | } |
| 841 | |
| 842 | // promoteTx adds a transaction to the pending (processable) list of transactions |
| 843 | // and returns whether it was inserted or an older was better. |