forked from TrueCloudLab/neoneo-go
core: improve blockchain error messages
This commit is contained in:
parent
a57c3f4842
commit
032d9749c2
1 changed files with 2 additions and 2 deletions
|
@ -367,7 +367,7 @@ func (bc *Blockchain) init() error {
|
||||||
|
|
||||||
currHeaderHeight, currHeaderHash, err := bc.dao.GetCurrentHeaderHeight()
|
currHeaderHeight, currHeaderHash, err := bc.dao.GetCurrentHeaderHeight()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return fmt.Errorf("failed to retrieve current header info: %w", err)
|
||||||
}
|
}
|
||||||
if bc.storedHeaderCount == 0 && currHeaderHeight == 0 {
|
if bc.storedHeaderCount == 0 && currHeaderHeight == 0 {
|
||||||
bc.headerHashes = append(bc.headerHashes, currHeaderHash)
|
bc.headerHashes = append(bc.headerHashes, currHeaderHash)
|
||||||
|
@ -425,7 +425,7 @@ func (bc *Blockchain) init() error {
|
||||||
|
|
||||||
bHeight, err := bc.dao.GetCurrentBlockHeight()
|
bHeight, err := bc.dao.GetCurrentBlockHeight()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return fmt.Errorf("failed to retrieve current block height: %w", err)
|
||||||
}
|
}
|
||||||
bc.blockHeight = bHeight
|
bc.blockHeight = bHeight
|
||||||
bc.persistedHeight = bHeight
|
bc.persistedHeight = bHeight
|
||||||
|
|
Loading…
Reference in a new issue