func (db *DB) IsAddressRegistered(address [4]byte) bool {

	// Get the head of the binaryTree
	var head = db.addressTreeHead
	//Get the address so we know the path in the binaryTree
	var bitAddress = byteToBit(address)

	for i := 0; i < len(bitAddress); i++ {
		if bitAddress[i] {
			head = head.rightChild()
			if head == nil {
				return false
			}
		} else {
			head = head.leftChild()
			if head == nil {
				return false
			}
		}
	}

	log.Println("Address", address, "is registered in the DB.")
	return true
}
//IsAddressRegistered checks if an address is registered
IsAddressRegistered checks if an address is registered
// IsAddressRegistered checks if an address is registered
func (db *DB) IsAddressRegistered(address [4]byte) bool {
	var head = db.addressTreeHead
	var bitAddress = byteToBit(address)
	for i := 0; i < len(bitAddress); i++ {
		if bitAddress[i] {
			head = head.rightChild()
			if head == nil {
				return false
			}
		} else {
			head = head.leftChild()
			if head == nil {
				return false
			}
		}
	}
	log.Println("Address", address, "is registered in the DB.")
	return true
}
func ( db * DB ) IsAddressRegistered ( address [ 4 ] byte ) bool { var head = db . addressTreeHead var bitAddress = byteToBit ( address ) for i := 0 ; i < len ( bitAddress ) ; i ++ { if bitAddress [ i ] { head = head . rightChild ( ) if head == nil { return false } } else { head = head . leftChild ( ) if head == nil { return false } } } log . Println ( " " , address , " " ) return true }
IsAddressRegistered checks if an address is registered
IsAddressRegistered checks if an address is registered
// Get the head of the binaryTree //Get the address so we know the path in the binaryTree