mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
Merge remote-tracking branch 'origin/v0.1.1-dev' into v0.1.2-dev
This commit is contained in:
commit
25bdaeed31
@ -1992,7 +1992,10 @@ func New(config *Config) (*BlockDAG, error) {
|
||||
|
||||
if genesis == nil {
|
||||
genesisBlock := util.NewBlock(dag.dagParams.GenesisBlock)
|
||||
isOrphan, isDelayed, err := dag.ProcessBlock(genesisBlock, BFNone)
|
||||
// To prevent the creation of a new err variable unintentionally so the
|
||||
// defered function above could read err - declare isOrphan and isDelayed explicitly.
|
||||
var isOrphan, isDelayed bool
|
||||
isOrphan, isDelayed, err = dag.ProcessBlock(genesisBlock, BFNone)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ package ffldb
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -640,7 +639,7 @@ func (b *bucket) CreateBucket(key []byte) (database.Bucket, error) {
|
||||
// Ensure bucket does not already exist.
|
||||
bidxKey := bucketIndexKey(b.id, key)
|
||||
if b.tx.hasKey(bidxKey) {
|
||||
str := fmt.Sprintf("bucket %s already exists", hex.EncodeToString(bidxKey))
|
||||
str := fmt.Sprintf("bucket %s already exists", string(bidxKey))
|
||||
return nil, makeDbErr(database.ErrBucketExists, str, nil)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user