diff --git a/go.mod b/go.mod index fbf52b84..dc340005 100644 --- a/go.mod +++ b/go.mod @@ -316,5 +316,5 @@ require ( replace ( github.com/filecoin-project/dagstore => github.com/ipfs-force-community/dagstore v0.4.4-0.20230628060530-4b25fff4d833 github.com/filecoin-project/filecoin-ffi => ./extern/filecoin-ffi - github.com/filecoin-project/go-jsonrpc => github.com/ipfs-force-community/go-jsonrpc v0.1.7 + github.com/filecoin-project/go-jsonrpc => github.com/ipfs-force-community/go-jsonrpc v0.1.8-0.20230707064447-fc69e93936b4 ) diff --git a/go.sum b/go.sum index 8dc21ae6..0da558e8 100644 --- a/go.sum +++ b/go.sum @@ -825,8 +825,8 @@ github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7 github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/ipfs-force-community/dagstore v0.4.4-0.20230628060530-4b25fff4d833 h1:2twcWpKmKa7iGXjw+wuN0suXavrJS5U7RYjCJml8qSI= github.com/ipfs-force-community/dagstore v0.4.4-0.20230628060530-4b25fff4d833/go.mod h1:YKn4qXih+/2xQWpfJsaKGOi4POw5vH5grDmfPCCnx8g= -github.com/ipfs-force-community/go-jsonrpc v0.1.7 h1:e0ZTapGFhDY54j0QpRYN54Q3FHawUBQAM1KvXOzZtYY= -github.com/ipfs-force-community/go-jsonrpc v0.1.7/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM= +github.com/ipfs-force-community/go-jsonrpc v0.1.8-0.20230707064447-fc69e93936b4 h1:xP8dO56A2/W0v5c8DjG+9iN7yxm6BaWr/etJjQ5kOy8= +github.com/ipfs-force-community/go-jsonrpc v0.1.8-0.20230707064447-fc69e93936b4/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM= github.com/ipfs-force-community/metrics v1.0.0/go.mod h1:mn40SioMuKtjmRumHFy/fJ26Pn028XuDjUJE9dorjyw= github.com/ipfs-force-community/metrics v1.0.1-0.20211022060227-11142a08b729/go.mod h1:mn40SioMuKtjmRumHFy/fJ26Pn028XuDjUJE9dorjyw= github.com/ipfs-force-community/metrics v1.0.1-0.20220824061112-ac916bacf2ea h1:mtR+uqI444dF1j3IcpDq3MCFBR5B/OQnHFulTuM7a6o= diff --git a/models/badger/storage_deal_test.go b/models/badger/storage_deal_test.go index 92c19e0a..55698f63 100644 --- a/models/badger/storage_deal_test.go +++ b/models/badger/storage_deal_test.go @@ -297,10 +297,9 @@ func TestListStorageDealByAddr(t *testing.T) { func TestListDeal(t *testing.T) { ctx, r, dealCases := prepareStorageDealTest(t) - var peerID peer.ID - testutil.Provide(t, &peerID) + peers := make([]peer.ID, 2) + testutil.Provide(t, &peers) miner := []address.Address{dealCases[0].Proposal.Provider, testutil.AddressProvider()(t)} - peers := []peer.ID{dealCases[0].Client, peerID} states := []storagemarket.StorageDealStatus{ storagemarket.StorageDealAcceptWait, storagemarket.StorageDealAwaitingPreCommit, @@ -308,6 +307,8 @@ func TestListDeal(t *testing.T) { storagemarket.StorageDealExpired, } + assert.NotEqual(t, peers[0].String(), peers[1].String()) + for i, deal := range dealCases { deal.Proposal.Provider = miner[i%2] deal.Client = peers[i%2] @@ -361,7 +362,7 @@ func TestListDeal(t *testing.T) { Page: defPage, }) assert.NoError(t, err) - assert.Equal(t, 5, len(deals)) + assert.Len(t, deals, 5) } storageDealAcceptWait := storagemarket.StorageDealAcceptWait