Skip to content

Commit

Permalink
Use new go-state-types state accessors (#711)
Browse files Browse the repository at this point in the history
  • Loading branch information
arajasek committed May 26, 2022
1 parent e7423a9 commit 51b501d
Show file tree
Hide file tree
Showing 37 changed files with 91 additions and 116 deletions.
5 changes: 2 additions & 3 deletions discovery/impl/local_test.go
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/stretchr/testify/require"

"github.com/filecoin-project/go-address"
specst "github.com/filecoin-project/specs-actors/v8/support/testing"

discoveryimpl "github.com/filecoin-project/go-fil-markets/discovery/impl"
"github.com/filecoin-project/go-fil-markets/discovery/migrations"
Expand All @@ -25,13 +24,13 @@ import (
func TestLocal_AddPeer(t *testing.T) {
ctx := context.Background()
peer1 := retrievalmarket.RetrievalPeer{
Address: specst.NewIDAddr(t, 1),
Address: shared_testutil.NewIDAddr(t, 1),
ID: peer.NewPeerRecord().PeerID,
PieceCID: nil,
}
pieceCid := shared_testutil.GenerateCids(1)[0]
peer2 := retrievalmarket.RetrievalPeer{
Address: specst.NewIDAddr(t, 2),
Address: shared_testutil.NewIDAddr(t, 2),
ID: peer.NewPeerRecord().PeerID,
PieceCID: &pieceCid,
}
Expand Down
8 changes: 1 addition & 7 deletions go.mod
Expand Up @@ -6,7 +6,6 @@ require (
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/filecoin-project/dagstore v0.5.2
github.com/filecoin-project/go-address v0.0.6
github.com/filecoin-project/go-bitfield v0.2.4 // indirect
github.com/filecoin-project/go-cbor-util v0.0.1
github.com/filecoin-project/go-commp-utils v0.1.3
github.com/filecoin-project/go-crypto v0.0.1 // indirect
Expand All @@ -15,14 +14,10 @@ require (
github.com/filecoin-project/go-fil-commcid v0.1.0
github.com/filecoin-project/go-fil-commp-hashhash v0.1.0
github.com/filecoin-project/go-padreader v0.0.1
github.com/filecoin-project/go-state-types v0.1.3
github.com/filecoin-project/go-state-types v0.1.6
github.com/filecoin-project/go-statemachine v1.0.2-0.20220322104818-27f8fbb86dfd
github.com/filecoin-project/go-statestore v0.2.0
github.com/filecoin-project/index-provider v0.6.1
github.com/filecoin-project/specs-actors v0.9.13
github.com/filecoin-project/specs-actors/v2 v2.3.6 // indirect
github.com/filecoin-project/specs-actors/v7 v7.0.0
github.com/filecoin-project/specs-actors/v8 v8.0.0-20220407202104-e375a8763a1c
github.com/hannahhoward/cbor-gen-for v0.0.0-20200817222906-ea96cece81f1
github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e
github.com/hashicorp/go-multierror v1.1.1
Expand Down Expand Up @@ -60,7 +55,6 @@ require (
github.com/stretchr/testify v1.7.0
github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11
github.com/whyrusleeping/cbor-gen v0.0.0-20220302191723-37c43cae8e14
github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 // indirect
golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b // indirect
golang.org/x/exp v0.0.0-20210715201039-d37aa40e8013
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2
Expand Down
36 changes: 3 additions & 33 deletions go.sum
Expand Up @@ -207,15 +207,10 @@ github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+
github.com/filecoin-project/go-address v0.0.5/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8=
github.com/filecoin-project/go-address v0.0.6 h1:DWQtj38ax+ogHwyH3VULRIoT8E6loyXqsk/p81xoY7M=
github.com/filecoin-project/go-address v0.0.6/go.mod h1:7B0/5DA13n6nHkB8bbGx1gWzG/dbTsZ0fgOJVGsM3TE=
github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 h1:t6qDiuGYYngDqaLc2ZUvdtAg4UNxPeOYaXhBWSNsVaM=
github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs=
github.com/filecoin-project/go-amt-ipld/v3 v3.0.0/go.mod h1:Qa95YNAbtoVCTSVtX38aAC1ptBnJfPma1R/zZsKmx4o=
github.com/filecoin-project/go-amt-ipld/v3 v3.1.0 h1:ZNJ9tEG5bE72vBWYiuh5bkxJVM3ViHNOmQ7qew9n6RE=
github.com/filecoin-project/go-amt-ipld/v3 v3.1.0/go.mod h1:UjM2QhDFrrjD5s1CdnkJkat4ga+LqZBZgTMniypABRo=
github.com/filecoin-project/go-amt-ipld/v4 v4.0.0 h1:XM81BJ4/6h3FV0WfFjh74cIDIgqMbJsMBLM0fIuLUUk=
github.com/filecoin-project/go-amt-ipld/v4 v4.0.0/go.mod h1:gF053YQ4BIpzTNDoEwHZas7U3oAwncDVGvOHyY8oDpE=
github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM=
github.com/filecoin-project/go-bitfield v0.2.3/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM=
github.com/filecoin-project/go-bitfield v0.2.4 h1:uZ7MeE+XfM5lqrHJZ93OnhQKc/rveW8p9au0C68JPgk=
github.com/filecoin-project/go-bitfield v0.2.4/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM=
github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg=
Expand All @@ -238,11 +233,6 @@ github.com/filecoin-project/go-fil-commcid v0.1.0 h1:3R4ds1A9r6cr8mvZBfMYxTS88Oq
github.com/filecoin-project/go-fil-commcid v0.1.0/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ=
github.com/filecoin-project/go-fil-commp-hashhash v0.1.0 h1:imrrpZWEHRnNqqv0tN7LXep5bFEVOVmQWHJvl2mgsGo=
github.com/filecoin-project/go-fil-commp-hashhash v0.1.0/go.mod h1:73S8WSEWh9vr0fDJVnKADhfIv/d6dCbAGaAGWbdJEI8=
github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM=
github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24=
github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 h1:b3UDemBYN2HNfk3KOXNuxgTTxlWi3xVvbQP0IT38fvM=
github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0/go.mod h1:7aWZdaQ1b16BVoQUYR+eEvrDCGJoPLxFpDynFjYfBjI=
github.com/filecoin-project/go-hamt-ipld/v3 v3.0.1/go.mod h1:gXpNmr3oQx8l3o7qkGyDjJjYSRX7hp/FGOStdqrWyDI=
github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0 h1:rVVNq0x6RGQIzCo1iiJlGFm9AGIZzeifggxtKMU7zmI=
github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0/go.mod h1:bxmzgT8tmeVQA1/gvBwFmYdT8SOFUwB3ovSUfG1Ux0g=
github.com/filecoin-project/go-indexer-core v0.2.9/go.mod h1:u03I3HB6ZnqCc3cm8Tq+QkTWBbfKOvNxM8K6Ny/IHRw=
Expand All @@ -253,12 +243,10 @@ github.com/filecoin-project/go-padreader v0.0.1 h1:8h2tVy5HpoNbr2gBRr+WD6zV6VD6X
github.com/filecoin-project/go-padreader v0.0.1/go.mod h1:VYVPJqwpsfmtoHnAmPx6MUwmrK6HIcDqZJiuZhtmfLQ=
github.com/filecoin-project/go-state-types v0.0.0-20200903145444-247639ffa6ad/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I=
github.com/filecoin-project/go-state-types v0.0.0-20200904021452-1883f36ca2f4/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I=
github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=
github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=
github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=
github.com/filecoin-project/go-state-types v0.1.1-0.20210810190654-139e0e79e69e/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=
github.com/filecoin-project/go-state-types v0.1.3 h1:rzIJyQo5HO2ptc8Jcu8P0qTutnI7NWwTle54eAHoNO0=
github.com/filecoin-project/go-state-types v0.1.3/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=
github.com/filecoin-project/go-state-types v0.1.6 h1:xDDYt188auutDP7miWceT8H7woW9EgunkM+EEm0mCLg=
github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig=
github.com/filecoin-project/go-statemachine v1.0.2-0.20220322104818-27f8fbb86dfd h1:Ykxbz+LvSCUIl2zFaaPGmF8KHXTJu9T/PymgHr7IHjs=
github.com/filecoin-project/go-statemachine v1.0.2-0.20220322104818-27f8fbb86dfd/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54=
Expand All @@ -267,24 +255,8 @@ github.com/filecoin-project/go-statestore v0.2.0 h1:cRRO0aPLrxKQCZ2UOQbzFGn4WDNd
github.com/filecoin-project/go-statestore v0.2.0/go.mod h1:8sjBYbS35HwPzct7iT4lIXjLlYyPor80aU7t7a/Kspo=
github.com/filecoin-project/index-provider v0.6.1 h1:yVpmtm1ASl2JZMNDC6H2Fe0neYo5akYgaJJB2wlcsMU=
github.com/filecoin-project/index-provider v0.6.1/go.mod h1:iAbSQ6sUpKC4GqfUSheGnYwj9d9B+X8pPi4BV1PgwZA=
github.com/filecoin-project/specs-actors v0.9.4 h1:FePB+hrctHHiTbmaY4hnvBJzfgckN3eJreUZWpS5yks=
github.com/filecoin-project/specs-actors v0.9.4/go.mod h1:BStZQzx5x7TmCkLv0Bpa07U6cPKol6fd3w9KjMPZ6Z4=
github.com/filecoin-project/specs-actors v0.9.13 h1:rUEOQouefi9fuVY/2HOroROJlZbOzWYXXeIh41KF2M4=
github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao=
github.com/filecoin-project/specs-actors/v2 v2.3.5-0.20210114162132-5b58b773f4fb/go.mod h1:LljnY2Mn2homxZsmokJZCpRuhOPxfXhvcek5gWkmqAc=
github.com/filecoin-project/specs-actors/v2 v2.3.6 h1:UxnWTfQd7JsOae39/aHCK0m1IBjdcyymCJfqxuSkn+g=
github.com/filecoin-project/specs-actors/v2 v2.3.6/go.mod h1:DJMpxVRXvev9t8P0XWA26RmTzN+MHiL9IlItVLT0zUc=
github.com/filecoin-project/specs-actors/v3 v3.1.0 h1:s4qiPw8pgypqBGAy853u/zdZJ7K9cTZdM1rTiSonHrg=
github.com/filecoin-project/specs-actors/v3 v3.1.0/go.mod h1:mpynccOLlIRy0QnR008BwYBwT9fen+sPR13MA1VmMww=
github.com/filecoin-project/specs-actors/v4 v4.0.0/go.mod h1:TkHXf/l7Wyw4ZejyXIPS2rK8bBO0rdwhTZyQQgaglng=
github.com/filecoin-project/specs-actors/v5 v5.0.4 h1:OY7BdxJWlUfUFXWV/kpNBYGXNPasDIedf42T3sGx08s=
github.com/filecoin-project/specs-actors/v5 v5.0.4/go.mod h1:5BAKRAMsOOlD8+qCw4UvT/lTLInCJ3JwOWZbX8Ipwq4=
github.com/filecoin-project/specs-actors/v6 v6.0.0/go.mod h1:V1AYfi5GkHXipx1mnVivoICZh3wtwPxDVuds+fbfQtk=
github.com/filecoin-project/specs-actors/v6 v6.0.1 h1:laxvHNsvrq83Y9n+W7znVCePi3oLyRf0Rkl4jFO8Wew=
github.com/filecoin-project/specs-actors/v6 v6.0.1/go.mod h1:V1AYfi5GkHXipx1mnVivoICZh3wtwPxDVuds+fbfQtk=
github.com/filecoin-project/specs-actors/v7 v7.0.0 h1:FQN7tjt3o68hfb3qLFSJBoLMuOFY0REkFVLO/zXj8RU=
github.com/filecoin-project/specs-actors/v7 v7.0.0/go.mod h1:TA5FwCna+Yi36POaT7SLKXsgEDvJwc0V/L6ZsO19B9M=
github.com/filecoin-project/specs-actors/v8 v8.0.0-20220407202104-e375a8763a1c h1:WdAk1RfDBOhypv+tFzdonzk3jjQIfk2FJBZdRyFrLN4=
github.com/filecoin-project/specs-actors/v8 v8.0.0-20220407202104-e375a8763a1c/go.mod h1:UYIPg65iPWoFw5NEftREdJwv9b/5yaLKdCgTvNI/2FA=
github.com/filecoin-project/storetheindex v0.4.0 h1:MPIDJYBknPbwBcVf+2/WEIK6LKxhZmfQGCrqKmvhFyU=
github.com/filecoin-project/storetheindex v0.4.0/go.mod h1:LIwqpXoKeGxOGEjmxPfdYVPQYoZOSI3oXMUd9XTCpjc=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
Expand Down Expand Up @@ -1563,8 +1535,6 @@ github.com/xlab/c-for-go v0.0.0-20201112171043-ea6dce5809cb/go.mod h1:pbNsDSxn1I
github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245 h1:Sw125DKxZhPUI4JLlWugkzsrlB50jR9v2khiD9FxuSo=
github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk=
github.com/xorcare/golden v0.6.0/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ=
github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 h1:oWgZJmC1DorFZDpfMfWg7xk29yEOZiXmo/wZl+utTI8=
github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/ybbus/jsonrpc/v2 v2.1.6/go.mod h1:rIuG1+ORoiqocf9xs/v+ecaAVeo3zcZHQgInyKFMeg0=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down
2 changes: 1 addition & 1 deletion retrievalmarket/impl/clientstates/client_states_test.go
Expand Up @@ -15,9 +15,9 @@ import (
datatransfer "github.com/filecoin-project/go-data-transfer"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/builtin/v8/paych"
"github.com/filecoin-project/go-statemachine/fsm"
fsmtest "github.com/filecoin-project/go-statemachine/fsm/testutil"
"github.com/filecoin-project/specs-actors/actors/builtin/paych"

"github.com/filecoin-project/go-fil-markets/retrievalmarket"
rm "github.com/filecoin-project/go-fil-markets/retrievalmarket"
Expand Down
2 changes: 1 addition & 1 deletion retrievalmarket/impl/integration_test.go
Expand Up @@ -30,7 +30,7 @@ import (
dtgstransport "github.com/filecoin-project/go-data-transfer/transport/graphsync"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/specs-actors/actors/builtin/paych"
"github.com/filecoin-project/go-state-types/builtin/v8/paych"

"github.com/filecoin-project/go-fil-markets/piecestore"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
Expand Down
9 changes: 4 additions & 5 deletions retrievalmarket/impl/provider_test.go
Expand Up @@ -23,7 +23,6 @@ import (
datatransfer "github.com/filecoin-project/go-data-transfer"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
spect "github.com/filecoin-project/specs-actors/v8/support/testing"

"github.com/filecoin-project/go-fil-markets/piecestore"
piecemigrations "github.com/filecoin-project/go-fil-markets/piecestore/migrations"
Expand Down Expand Up @@ -948,7 +947,7 @@ func TestProvider_Construct(t *testing.T) {
}

_, err := retrievalimpl.NewProvider(
spect.NewIDAddr(t, 2344),
tut.NewIDAddr(t, 2344),
node,
sa,
tut.NewTestRetrievalMarketNetwork(tut.TestNetworkParams{}),
Expand Down Expand Up @@ -1004,7 +1003,7 @@ func TestProviderConfigOpts(t *testing.T) {
}

p, err := retrievalimpl.NewProvider(
spect.NewIDAddr(t, 2344),
tut.NewIDAddr(t, 2344),
node,
sa,
tut.NewTestRetrievalMarketNetwork(tut.TestNetworkParams{}),
Expand All @@ -1025,7 +1024,7 @@ func TestProviderConfigOpts(t *testing.T) {
})

p, err = retrievalimpl.NewProvider(
spect.NewIDAddr(t, 2344),
tut.NewIDAddr(t, 2344),
testnodes.NewTestRetrievalProviderNode(),
testnodes.NewTestSectorAccessor(),
tut.NewTestRetrievalMarketNetwork(tut.TestNetworkParams{}),
Expand Down Expand Up @@ -1186,7 +1185,7 @@ func TestProviderMigrations(t *testing.T) {
}

retrievalProvider, err := retrievalimpl.NewProvider(
spect.NewIDAddr(t, 2344),
tut.NewIDAddr(t, 2344),
node,
sa,
tut.NewTestRetrievalMarketNetwork(tut.TestNetworkParams{}),
Expand Down
12 changes: 6 additions & 6 deletions retrievalmarket/impl/testnodes/test_retrieval_client_node.go
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/specs-actors/actors/builtin/paych"
paychtypes "github.com/filecoin-project/go-state-types/builtin/v8/paych"

"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-fil-markets/shared"
Expand All @@ -29,7 +29,7 @@ type TestRetrievalClientNode struct {
createPaychMsgCID, addFundsMsgCID cid.Cid
lane uint64
laneError error
voucher *paych.SignedVoucher
voucher *paychtypes.SignedVoucher
voucherError, waitErr error
channelAvailableFunds retrievalmarket.ChannelAvailableFunds
checkAvailableFundsErr error
Expand All @@ -39,7 +39,7 @@ type TestRetrievalClientNode struct {
receivedKnownAddresses map[retrievalmarket.RetrievalPeer]struct{}
expectedKnownAddresses map[retrievalmarket.RetrievalPeer]struct{}
allocateLaneRecorder func(address.Address)
createPaymentVoucherRecorder func(voucher *paych.SignedVoucher)
createPaymentVoucherRecorder func(voucher *paychtypes.SignedVoucher)
getCreatePaymentChannelRecorder func(address.Address, address.Address, abi.TokenAmount)
}

Expand All @@ -50,10 +50,10 @@ type TestRetrievalClientNodeParams struct {
CreatePaychCID, AddFundsCID cid.Cid
Lane uint64
LaneError error
Voucher *paych.SignedVoucher
Voucher *paychtypes.SignedVoucher
VoucherError error
AllocateLaneRecorder func(address.Address)
PaymentVoucherRecorder func(voucher *paych.SignedVoucher)
PaymentVoucherRecorder func(voucher *paychtypes.SignedVoucher)
PaymentChannelRecorder func(address.Address, address.Address, abi.TokenAmount)
AddFundsOnly bool
WaitForReadyErr error
Expand Down Expand Up @@ -113,7 +113,7 @@ func (trcn *TestRetrievalClientNode) AllocateLane(ctx context.Context, paymentCh
}

// CreatePaymentVoucher creates a mock payment voucher based on a channel and lane
func (trcn *TestRetrievalClientNode) CreatePaymentVoucher(ctx context.Context, paymentChannel address.Address, amount abi.TokenAmount, lane uint64, tok shared.TipSetToken) (*paych.SignedVoucher, error) {
func (trcn *TestRetrievalClientNode) CreatePaymentVoucher(ctx context.Context, paymentChannel address.Address, amount abi.TokenAmount, lane uint64, tok shared.TipSetToken) (*paychtypes.SignedVoucher, error) {
if trcn.createPaymentVoucherRecorder != nil {
trcn.createPaymentVoucherRecorder(trcn.voucher)
}
Expand Down
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/specs-actors/actors/builtin/paych"
paychtypes "github.com/filecoin-project/go-state-types/builtin/v8/paych"

"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-fil-markets/shared"
Expand Down Expand Up @@ -93,7 +93,7 @@ func (trpn *TestRetrievalProviderNode) VerifyExpectations(t *testing.T) {
func (trpn *TestRetrievalProviderNode) SavePaymentVoucher(
ctx context.Context,
paymentChannel address.Address,
voucher *paych.SignedVoucher,
voucher *paychtypes.SignedVoucher,
proof []byte,
expectedAmount abi.TokenAmount,
tok shared.TipSetToken) (abi.TokenAmount, error) {
Expand Down Expand Up @@ -147,7 +147,7 @@ func (trpn *TestRetrievalProviderNode) GetChainHead(ctx context.Context) (shared
// --- Non-interface Functions

// to ExpectedVoucherKey creates a lookup key for expected vouchers.
func (trpn *TestRetrievalProviderNode) toExpectedVoucherKey(paymentChannel address.Address, voucher *paych.SignedVoucher, proof []byte, expectedAmount abi.TokenAmount) (expectedVoucherKey, error) {
func (trpn *TestRetrievalProviderNode) toExpectedVoucherKey(paymentChannel address.Address, voucher *paychtypes.SignedVoucher, proof []byte, expectedAmount abi.TokenAmount) (expectedVoucherKey, error) {
pcString := paymentChannel.String()
buf := new(bytes.Buffer)
if err := voucher.MarshalCBOR(buf); err != nil {
Expand All @@ -168,7 +168,7 @@ func (trpn *TestRetrievalProviderNode) toExpectedVoucherKey(paymentChannel addre
// expectedErr: an error message to expect
func (trpn *TestRetrievalProviderNode) ExpectVoucher(
paymentChannel address.Address,
voucher *paych.SignedVoucher,
voucher *paychtypes.SignedVoucher,
proof []byte,
expectedAmount abi.TokenAmount,
actualAmount abi.TokenAmount, // the actual amount it should have (same unless you want to trigger an error)
Expand Down
4 changes: 2 additions & 2 deletions retrievalmarket/migrations/migrations.go
Expand Up @@ -10,7 +10,7 @@ import (
versioning "github.com/filecoin-project/go-ds-versioning/pkg"
"github.com/filecoin-project/go-ds-versioning/pkg/versioned"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/specs-actors/actors/builtin/paych"
paychtypes "github.com/filecoin-project/go-state-types/builtin/v8/paych"

"github.com/filecoin-project/go-fil-markets/piecestore"
piecemigrations "github.com/filecoin-project/go-fil-markets/piecestore/migrations"
Expand Down Expand Up @@ -145,7 +145,7 @@ func (dr *DealResponse0) Type() datatransfer.TypeIdentifier {
type DealPayment0 struct {
ID retrievalmarket.DealID
PaymentChannel address.Address
PaymentVoucher *paych.SignedVoucher
PaymentVoucher *paychtypes.SignedVoucher
}

// Type method makes DealPayment0 usable as a voucher
Expand Down
2 changes: 1 addition & 1 deletion retrievalmarket/migrations/migrations_cbor_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 51b501d

Please sign in to comment.