forked from TrueCloudLab/neoneo-go
core: remove named return variable from addHeaders()
This commit is contained in:
parent
6bffa811d4
commit
61ad82160b
1 changed files with 3 additions and 2 deletions
|
@ -444,10 +444,11 @@ func (bc *Blockchain) AddHeaders(headers ...*block.Header) error {
|
||||||
|
|
||||||
// addHeaders is an internal implementation of AddHeaders (`verify` parameter
|
// addHeaders is an internal implementation of AddHeaders (`verify` parameter
|
||||||
// tells it to verify or not verify given headers).
|
// tells it to verify or not verify given headers).
|
||||||
func (bc *Blockchain) addHeaders(verify bool, headers ...*block.Header) (err error) {
|
func (bc *Blockchain) addHeaders(verify bool, headers ...*block.Header) error {
|
||||||
var (
|
var (
|
||||||
start = time.Now()
|
start = time.Now()
|
||||||
batch = bc.dao.Store.Batch()
|
batch = bc.dao.Store.Batch()
|
||||||
|
err error
|
||||||
)
|
)
|
||||||
|
|
||||||
if len(headers) > 0 {
|
if len(headers) > 0 {
|
||||||
|
@ -471,7 +472,7 @@ func (bc *Blockchain) addHeaders(verify bool, headers ...*block.Header) (err err
|
||||||
}
|
}
|
||||||
for _, h := range headers {
|
for _, h := range headers {
|
||||||
if err = bc.verifyHeader(h, lastHeader); err != nil {
|
if err = bc.verifyHeader(h, lastHeader); err != nil {
|
||||||
return
|
return err
|
||||||
}
|
}
|
||||||
lastHeader = h
|
lastHeader = h
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue