mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08: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}
|
||||
}
|
||||
|
||||
func (u utxoSetIterator) Next() bool {
|
||||
func (u *utxoSetIterator) Next() bool {
|
||||
u.index++
|
||||
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]
|
||||
return &pair.outpoint, pair.entry, nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user