Instrument basic logging

This commit is contained in:
pedro martelletto 2017-01-12 11:03:42 +00:00 committed by Olaoluwa Osuntokun
parent cf74c8c3ca
commit 9809f4ffdd

View File

@ -7,11 +7,14 @@ package indexers
import (
"encoding/binary"
"errors"
"fmt"
"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/database"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcutil/gcs"
"os"
)
const (
@ -102,6 +105,8 @@ func generateFilterForBlock(block *btcutil.Block) ([]byte, error) {
return nil, err
}
fmt.Fprintf(os.Stderr, "Generated CBF for block %v", block.Hash())
return filter.Bytes(), nil
}
@ -124,6 +129,8 @@ func (idx *CBFIndex) ConnectBlock(dbTx database.Tx, block *btcutil.Block,
return err
}
fmt.Fprintf(os.Stderr, "Stored CBF for block %v", block.Hash())
return nil
}