Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
chadlagore committed Jun 17, 2017
1 parent 09e979e commit 4148a01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ func (p *Pool) GetN(N int) *blockchain.Transaction {

// GetIndex returns the index of the transaction in the ordering.
func (p *Pool) GetIndex(t *blockchain.Transaction) int {
return getIndex(p.Order, p.ValidTransactions[t.Input.Hash].Time,
0, p.Len()-1)
target := p.ValidTransactions[t.Input.Hash].Time
return getIndex(p.Order, target, 0, p.Len()-1)
}

// getIndex does a binary search for a PooledTransaction by timestamp.
Expand Down

0 comments on commit 4148a01

Please sign in to comment.