mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-10-14 00:59:33 +00:00
[NOD-1532] utxoSetIterator should be a pointer receiver
This commit is contained in:
parent
f4a2fbf64f
commit
34be898491
@ -238,12 +238,12 @@ func newUTXOSetIterator(collection model.UTXOCollection) *utxoSetIterator {
|
|||||||
return &utxoSetIterator{index: 0, pairs: pairs}
|
return &utxoSetIterator{index: 0, pairs: pairs}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u utxoSetIterator) Next() bool {
|
func (u *utxoSetIterator) Next() bool {
|
||||||
u.index++
|
u.index++
|
||||||
return u.index < len(u.pairs)
|
return u.index < len(u.pairs)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u utxoSetIterator) Get() (outpoint *externalapi.DomainOutpoint, utxoEntry *externalapi.UTXOEntry, err error) {
|
func (u *utxoSetIterator) Get() (outpoint *externalapi.DomainOutpoint, utxoEntry *externalapi.UTXOEntry, err error) {
|
||||||
pair := u.pairs[u.index]
|
pair := u.pairs[u.index]
|
||||||
return &pair.outpoint, pair.entry, nil
|
return &pair.outpoint, pair.entry, nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user