diff --git a/accept.go b/accept.go index 94fa73c7..58a7d150 100644 --- a/accept.go +++ b/accept.go @@ -19,6 +19,7 @@ func (b *BlockChain) maybeAcceptBlock(block *btcutil.Block) error { // if this is the genesis block. prevNode, err := b.getPrevNodeFromBlock(block) if err != nil { + log.Errorf("getPrevNodeFromBlock: %v", err) return err } @@ -34,6 +35,7 @@ func (b *BlockChain) maybeAcceptBlock(block *btcutil.Block) error { blockHeader := block.MsgBlock().Header expectedDifficulty, err := b.calcNextRequiredDifficulty(prevNode, block) if err != nil { + log.Errorf("calcNextRequiredDifficulty: %v", err) return err } blockDifficulty := blockHeader.Bits @@ -47,6 +49,7 @@ func (b *BlockChain) maybeAcceptBlock(block *btcutil.Block) error { // the last several blocks (medianTimeBlocks). medianTime, err := b.calcPastMedianTime(prevNode) if err != nil { + log.Errorf("calcPastMedianTime: %v", err) return err } if !blockHeader.Timestamp.After(medianTime) { @@ -147,6 +150,7 @@ func (b *BlockChain) maybeAcceptBlock(block *btcutil.Block) error { // also handles validation of the transaction scripts. err = b.connectBestChain(newNode, block) if err != nil { + log.Errorf("connectBestChain: %v", err) return err } diff --git a/chain.go b/chain.go index 4113c914..b9a6efe3 100644 --- a/chain.go +++ b/chain.go @@ -413,6 +413,7 @@ func (b *BlockChain) calcPastMedianTime(startNode *blockNode) (time.Time, error) var err error iterNode, err = b.getPrevNodeFromNode(iterNode) if err != nil { + log.Errorf("getPrevNodeFromNode: %v", err) return time.Time{}, err } }