parent
d9432fe8ad
commit
2bb41582c9
1 changed files with 8 additions and 1 deletions
|
@ -172,11 +172,18 @@ func (a *Account) CurrentAddress() (btcutil.Address, error) {
|
||||||
func (a *Account) ListSinceBlock(since, curBlockHeight int32, minconf int) ([]btcjson.ListTransactionsResult, error) {
|
func (a *Account) ListSinceBlock(since, curBlockHeight int32, minconf int) ([]btcjson.ListTransactionsResult, error) {
|
||||||
var txList []btcjson.ListTransactionsResult
|
var txList []btcjson.ListTransactionsResult
|
||||||
for _, txRecord := range a.TxStore.SortedRecords() {
|
for _, txRecord := range a.TxStore.SortedRecords() {
|
||||||
// check block number.
|
// Transaction records must only be considered if they occur
|
||||||
|
// after the block height since.
|
||||||
if since != -1 && txRecord.Height() <= since {
|
if since != -1 && txRecord.Height() <= since {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Transactions that have not met minconf confirmations are to
|
||||||
|
// be ignored.
|
||||||
|
if !confirmed(minconf, txRecord.Height(), curBlockHeight) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
txList = append(txList,
|
txList = append(txList,
|
||||||
txRecord.TxInfo(a.name, curBlockHeight, a.Net())...)
|
txRecord.TxInfo(a.name, curBlockHeight, a.Net())...)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue