mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-03 20:56:42 +00:00

* Add Close() function to all the iterators * Add defer iterator.Close() whenever we open an iterator * Add isClosed to all iterators and panic/return error if used after closing Co-authored-by: Svarog <feanorr@gmail.com>
11 lines
255 B
Go
11 lines
255 B
Go
package externalapi
|
|
|
|
// ReadOnlyUTXOSetIterator is an iterator over all entries in a
|
|
// ReadOnlyUTXOSet
|
|
type ReadOnlyUTXOSetIterator interface {
|
|
First() bool
|
|
Next() bool
|
|
Get() (outpoint *DomainOutpoint, utxoEntry UTXOEntry, err error)
|
|
Close() error
|
|
}
|