// removeTx removes a single transaction from the queue, moving all subsequent
// transactions back to the future queue.
removeTx removes a single transaction from the queue, moving all subsequent
transactions back to the future queue.
// removeTx removes a single transaction from the queue moving all subsequent // transactions back to the future queue .
func (nPool *NormalTxPool) removeTx(hash common.Hash, outofbound bool) {
	tx := nPool.all.Get(hash)
	if tx == nil {
		return
	}
	addr, _ := nPool.checkTxFrom(tx)
	nPool.all.Remove(hash)
	nPool.deleteMap(tx)
	if pending := nPool.pending[addr]; pending != nil {
		if removed, _ := pending.Remove(tx); removed {
			if pending.Empty(tx.GetTxCurrency()) {
				delete(nPool.pending, addr)
			}
			if nonce := tx.Nonce(); nPool.pendingState.GetNonce(tx.Currency, addr) > nonce {
				nPool.pendingState.SetNonce(tx.Currency, addr, nonce)
			}
			return
		}
	}
}
func ( nPool * NormalTxPool ) removeTx ( hash common . Hash , outofbound bool ) { tx := nPool . all . Get ( hash ) if tx == nil { return } addr , _ := nPool . checkTxFrom ( tx ) nPool . all . Remove ( hash ) nPool . deleteMap ( tx ) if pending := nPool . pending [ addr ] ; pending != nil { if removed , _ := pending . Remove ( tx ) ; removed { if pending . Empty ( tx . GetTxCurrency ( ) ) { delete ( nPool . pending , addr ) } if nonce := tx . Nonce ( ) ; nPool . pendingState . GetNonce ( tx . Currency , addr ) > nonce { nPool . pendingState . SetNonce ( tx . Currency , addr , nonce ) } return } } }
removeTx removes a single transaction from the queue, moving all subsequent
transactions back to the future queue.
removeTx removes a single transaction from the queue moving all subsequent transactions back to the future queue .
// Fetch the transaction we wish to delete // 如果交易中已经有了from就不需要在做解签 // Remove it from the list of known transactions // Remove the transaction from the pending lists and reset the account nonce // If no more pending transactions are left, remove the list // Update the account nonce if needed