Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
Return nil when updating index hashes if index doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
cpacia committed Feb 24, 2017
1 parent 2d92d4e commit 720afe0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/listings.go
Expand Up @@ -356,7 +356,7 @@ func (n *OpenBazaarNode) UpdateIndexHashes(hashes map[string]string) error {

_, ferr := os.Stat(indexPath)
if os.IsNotExist(ferr) {
return ferr
return nil
}
// Read existing file
file, err := ioutil.ReadFile(indexPath)
Expand Down
2 changes: 2 additions & 0 deletions core/moderation.go
Expand Up @@ -18,6 +18,8 @@ import (

var ModeratorPointerID multihash.Multihash

var NoListingsError error = errors.New("No listings to set moderators on")

func init() {
modHash := sha256.Sum256([]byte("moderators"))
encoded, err := multihash.Encode(modHash[:], multihash.SHA2_256)
Expand Down

0 comments on commit 720afe0

Please sign in to comment.