Skip to content

Commit

Permalink
updates after repo rename & rebase with master
Browse files Browse the repository at this point in the history
  • Loading branch information
shannonwells committed Jan 10, 2020
1 parent 6c94789 commit 8a238c4
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 39 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ jobs:
- run: sudo apt-get update
- restore_cache:
name: restore go mod cache
key: v1-go-deps-{{ arch }}-{{ checksum "/home/circleci/project/go-fil-components/go.mod" }}
key: v1-go-deps-{{ arch }}-{{ checksum "/home/circleci/project/go-fil-markets/go.mod" }}
- run:
command: make build
- store_artifacts:
path: go-fil-components
path: go-fil-markets
- store_artifacts:
path: go-fil-components
path: go-fil-markets

test: &test
description: |
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# go-fil-markets
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
[![CircleCI](https://circleci.com/gh/filecoin-project/go-fil-components.svg?style=svg)](https://circleci.com/gh/filecoin-project/go-fil-components)
[![codecov](https://codecov.io/gh/filecoin-project/go-fil-components/branch/master/graph/badge.svg)](https://codecov.io/gh/filecoin-project/go-fil-components)
[![CircleCI](https://circleci.com/gh/filecoin-project/go-fil-markets.svg?style=svg)](https://circleci.com/gh/filecoin-project/go-fil-markets)
[![codecov](https://codecov.io/gh/filecoin-project/go-fil-markets/branch/master/graph/badge.svg)](https://codecov.io/gh/filecoin-project/go-fil-markets)

This repository contains modular implementations of the storage and retrieval market subsystems of Filecoin. These modules are guided by the [v1.0 and 1.1 Filecoin specification updates](https://filecoin-project.github.io/specs/#intro__changelog).

Expand All @@ -14,7 +14,7 @@ Separating an implementation into a blockchain component and one or more mining
## Contributing
PRs are welcome! Please first read the design docs and look over the current code. PRs against
master require approval of at least two maintainers. For the rest, please see our
[CONTRIBUTING](.go-fil-components/CONTRIBUTING.md) guide.
[CONTRIBUTING](.go-fil-markets/CONTRIBUTING.md) guide.

## Project-level documentation
The filecoin-project has a [community repo](https://github.com/filecoin-project/community) that documents in more detail our policies and guidelines, such as discussion forums and chat rooms and [Code of Conduct](https://github.com/filecoin-project/community/blob/master/CODE_OF_CONDUCT.md).
Expand Down
13 changes: 2 additions & 11 deletions retrievalmarket/impl/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,14 @@ import (
"reflect"
"sync"

blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"github.com/filecoin-project/go-address"
blockstore "github.com/ipfs/go-ipfs-blockstore"
logging "github.com/ipfs/go-log"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
cbg "github.com/whyrusleeping/cbor-gen"
"golang.org/x/xerrors"

"github.com/filecoin-project/go-cbor-util"

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-fil-markets/shared/params"
rmnet "github.com/filecoin-project/go-fil-markets/retrievalmarket/network"
"github.com/filecoin-project/go-fil-markets/shared/tokenamount"
"github.com/filecoin-project/go-fil-markets/shared/types"
)

var log = logging.Logger("retrieval")
Expand Down
14 changes: 7 additions & 7 deletions retrievalmarket/impl/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/filecoin-project/go-fil-components/retrievalmarket"
retrievalimpl "github.com/filecoin-project/go-fil-components/retrievalmarket/impl"
"github.com/filecoin-project/go-fil-components/retrievalmarket/network"
rmnet "github.com/filecoin-project/go-fil-components/retrievalmarket/network"
"github.com/filecoin-project/go-fil-components/shared/tokenamount"
"github.com/filecoin-project/go-fil-components/shared/types"
tut "github.com/filecoin-project/go-fil-components/shared_testutil"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
retrievalimpl "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl"
"github.com/filecoin-project/go-fil-markets/retrievalmarket/network"
rmnet "github.com/filecoin-project/go-fil-markets/retrievalmarket/network"
"github.com/filecoin-project/go-fil-markets/shared/tokenamount"
"github.com/filecoin-project/go-fil-markets/shared/types"
tut "github.com/filecoin-project/go-fil-markets/shared_testutil"
)

func TestClient_Query(t *testing.T) {
Expand Down
10 changes: 3 additions & 7 deletions retrievalmarket/impl/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"github.com/libp2p/go-libp2p-core/network"
"golang.org/x/xerrors"

cborutil "github.com/filecoin-project/go-cbor-util"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
rmnet "github.com/filecoin-project/go-fil-markets/retrievalmarket/network"
"github.com/filecoin-project/go-fil-markets/shared/params"
"github.com/filecoin-project/go-fil-markets/shared/tokenamount"
)
Expand All @@ -36,18 +36,14 @@ type provider struct {

// TODO: Replace with RetrievalProviderNode for
// https://github.com/filecoin-project/go-retrieval-market-project/issues/4
node retrievalmarket.RetrievalProviderNode

pricePerByte tokenamount.TokenAmount

subscribersLk sync.RWMutex
node retrievalmarket.RetrievalProviderNode
network rmnet.RetrievalMarketNetwork
paymentInterval uint64
paymentIntervalIncrease uint64
paymentAddress address.Address
pricePerByte tokenamount.TokenAmount
subscribers []retrievalmarket.ProviderSubscriber
subscribersLk sync.RWMutex
}

// NewProvider returns a new retrieval provider
Expand Down Expand Up @@ -160,7 +156,7 @@ func (p *provider) HandleQueryStream(stream rmnet.RetrievalQueryStream) {
}
}

type handlerDeal struct { //nolint: unused
type handlerDeal struct { // nolint: unused
p *provider
stream network.Stream

Expand Down
12 changes: 6 additions & 6 deletions retrievalmarket/impl/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"github.com/libp2p/go-libp2p-core/peer"
"github.com/stretchr/testify/require"

"github.com/filecoin-project/go-fil-components/retrievalmarket"
retrievalimpl "github.com/filecoin-project/go-fil-components/retrievalmarket/impl"
"github.com/filecoin-project/go-fil-components/retrievalmarket/network"
"github.com/filecoin-project/go-fil-components/shared/tokenamount"
"github.com/filecoin-project/go-fil-components/shared/types"
tut "github.com/filecoin-project/go-fil-components/shared_testutil"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
retrievalimpl "github.com/filecoin-project/go-fil-markets/retrievalmarket/impl"
"github.com/filecoin-project/go-fil-markets/retrievalmarket/network"
"github.com/filecoin-project/go-fil-markets/shared/tokenamount"
"github.com/filecoin-project/go-fil-markets/shared/types"
tut "github.com/filecoin-project/go-fil-markets/shared_testutil"
)

func TestHandleQueryStream(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions shared_testutil/test_network_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"errors"
"testing"

rm "github.com/filecoin-project/go-fil-components/retrievalmarket"
rmnet "github.com/filecoin-project/go-fil-components/retrievalmarket/network"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/stretchr/testify/require"

rm "github.com/filecoin-project/go-fil-markets/retrievalmarket"
rmnet "github.com/filecoin-project/go-fil-markets/retrievalmarket/network"
)

// QueryReader is a function to mock reading queries.
Expand Down

0 comments on commit 8a238c4

Please sign in to comment.