Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: memory leak #375

Merged
merged 2 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
9 changes: 5 additions & 4 deletions models/badger/storage_deal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,17 +297,18 @@ 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,
storagemarket.StorageDealFailing,
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]
Expand Down Expand Up @@ -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
Expand Down