btcsuite / btcdb

Provides a database interface for the bitcoin block chain - a package from btcd
30 stars 18 forks source link

BlockShaMissing should include the missing block hash #7

Closed jrick closed 9 years ago

jrick commented 10 years ago

The BlockShaMissing error is not very descriptive when printed, due to the missing block sha not being included in the error string. To fix this, BlockShaMissing should be changed to a type rather than just a variable. For example:

type BlockShaMissing btcwire.ShaHash

func (e *BlockShaMissing) Error() string {
        return "block " + (*btcwire.ShaHash)(e).String() + " missing"
}
davecgh commented 9 years ago

As discussed in #6, btcdb is going to be receiving a fairly major overhaul to support concurrent downloads, so this will be a part of that work.

davecgh commented 9 years ago

This has been moved to btcsuite/btcd#256.