core: test updates
This commit is contained in:
		@@ -284,7 +284,6 @@ func (pool *TxPool) checkQueue() {
 | 
				
			|||||||
		addq := addq[:0]
 | 
							addq := addq[:0]
 | 
				
			||||||
		for hash, tx := range txs {
 | 
							for hash, tx := range txs {
 | 
				
			||||||
			if tx.AccountNonce < curnonce {
 | 
								if tx.AccountNonce < curnonce {
 | 
				
			||||||
				fmt.Println("delete the tx", tx.AccountNonce, curnonce)
 | 
					 | 
				
			||||||
				// Drop queued transactions whose nonce is lower than
 | 
									// Drop queued transactions whose nonce is lower than
 | 
				
			||||||
				// the account nonce because they have been processed.
 | 
									// the account nonce because they have been processed.
 | 
				
			||||||
				delete(txs, hash)
 | 
									delete(txs, hash)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -119,7 +119,7 @@ func TestRemoveTx(t *testing.T) {
 | 
				
			|||||||
	from, _ := tx.From()
 | 
						from, _ := tx.From()
 | 
				
			||||||
	pool.state.AddBalance(from, big.NewInt(1))
 | 
						pool.state.AddBalance(from, big.NewInt(1))
 | 
				
			||||||
	pool.queueTx(tx.Hash(), tx)
 | 
						pool.queueTx(tx.Hash(), tx)
 | 
				
			||||||
	pool.addTx(tx.Hash(), tx)
 | 
						pool.addTx(tx.Hash(), from, tx)
 | 
				
			||||||
	if len(pool.queue) != 1 {
 | 
						if len(pool.queue) != 1 {
 | 
				
			||||||
		t.Error("expected queue to be 1, got", len(pool.queue))
 | 
							t.Error("expected queue to be 1, got", len(pool.queue))
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user