Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indexers: Use testable bucket for existsaddrindex. #1440

Merged
merged 1 commit into from
Sep 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions blockchain/indexers/existsaddrindex.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ func (idx *ExistsAddrIndex) Create(dbTx database.Tx) error {

// dbPutExistsAddr uses an existing database transaction to update or add a
// used address index to the database.
func dbPutExistsAddr(bucket database.Bucket, addrKey [addrKeySize]byte) error {
func dbPutExistsAddr(bucket internalBucket, addrKey [addrKeySize]byte) error {
return bucket.Put(addrKey[:], nil)
}

// existsAddress takes a bucket and key for an address and responds with
// whether or not the key exists in the database.
func (idx *ExistsAddrIndex) existsAddress(bucket database.Bucket, k [addrKeySize]byte) bool {
func (idx *ExistsAddrIndex) existsAddress(bucket internalBucket, k [addrKeySize]byte) bool {
if bucket.Get(k[:]) != nil {
return true
}
Expand Down