Commit b4ef99bc authored by Brian Tiger Chow's avatar Brian Tiger Chow

fix(exch) name the error

parent b5ea124a
......@@ -10,6 +10,8 @@ import (
u "github.com/jbenet/go-ipfs/util"
)
var OfflineMode = errors.New("Block unavailable. Operating in offline mode")
func NewOfflineExchange() exchange.Interface {
return &offlineExchange{}
}
......@@ -23,7 +25,7 @@ type offlineExchange struct {
// given key.
// NB: This function may return before the timeout expires.
func (_ *offlineExchange) Block(context.Context, u.Key) (*blocks.Block, error) {
return nil, errors.New("Block unavailable. Operating in offline mode")
return nil, OfflineMode
}
// HasBlock always returns nil.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment