Commit 391b626c authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Jeromy

rename exchange

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent abc92d59
......@@ -14,7 +14,7 @@ import (
var OfflineMode = errors.New("Block unavailable. Operating in offline mode")
func NewOfflineExchange() exchange.Interface {
func Exchange() exchange.Interface {
return &offlineExchange{}
}
......
......@@ -10,7 +10,7 @@ import (
)
func TestBlockReturnsErr(t *testing.T) {
off := NewOfflineExchange()
off := Exchange()
_, err := off.GetBlock(context.Background(), u.Key("foo"))
if err != nil {
return // as desired
......@@ -19,7 +19,7 @@ func TestBlockReturnsErr(t *testing.T) {
}
func TestHasBlockReturnsNil(t *testing.T) {
off := NewOfflineExchange()
off := Exchange()
block := blocks.NewBlock([]byte("data"))
err := off.HasBlock(context.Background(), *block)
if err != 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