Skip to content

Commit

Permalink
fix(deps): update deps and fix syntax
Browse files Browse the repository at this point in the history
Update to latest fetcher/dag-writer and fix node api

License: MIT
Signed-off-by: hannahhoward <hannah@hannahhoward.net>
  • Loading branch information
hannahhoward committed Apr 10, 2021
1 parent 0c4fa8f commit 12dff57
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 28 deletions.
13 changes: 7 additions & 6 deletions core/coreapi/coreapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import (

bserv "github.com/ipfs/go-blockservice"
"github.com/ipfs/go-dagwriter"
"github.com/ipfs/go-fetcher"
bsdagwriter "github.com/ipfs/go-dagwriter/impl/blockservice"
bsfetcher "github.com/ipfs/go-fetcher/impl/blockservice"
blockstore "github.com/ipfs/go-ipfs-blockstore"
exchange "github.com/ipfs/go-ipfs-exchange-interface"
offlinexch "github.com/ipfs/go-ipfs-exchange-offline"
Expand Down Expand Up @@ -59,7 +60,7 @@ type CoreAPI struct {

blocks bserv.BlockService
dag ipld.DAGService
fetcherConfig fetcher.FetcherConfig
fetcherConfig bsfetcher.FetcherConfig
dagWriter dagwriter.DagWritingService
peerstore pstore.Peerstore
peerHost p2phost.Host
Expand Down Expand Up @@ -110,7 +111,7 @@ func (api *CoreAPI) Dag() coreiface.APIDagService {
}

type nodeAPI struct {
fetcher.FetcherConfig
bsfetcher.FetcherConfig
dagwriter.DagWritingService
}

Expand Down Expand Up @@ -200,9 +201,9 @@ func (api *CoreAPI) WithOptions(opts ...options.ApiOption) (coreiface.CoreAPI, e
parentOpts: settings,
}

subApi.fetcherConfig = fetcher.NewFetcherConfig(subApi.blocks)
subApi.fetcherConfig.AugmentChooser = unixfsnode.AugmentPrototypeChooser
subApi.dagWriter = dagwriter.NewDagWriter(subApi.blocks)
subApi.fetcherConfig = bsfetcher.NewFetcherConfig(subApi.blocks)
subApi.fetcherConfig.NodeReifier = unixfsnode.Reify
subApi.dagWriter = bsdagwriter.NewDagWriter(subApi.blocks)

subApi.checkOnline = func(allowOffline bool) error {
if !n.IsOnline && !allowOffline {
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ require (
github.com/ipfs/go-blockservice v0.1.4
github.com/ipfs/go-cid v0.0.7
github.com/ipfs/go-cidutil v0.0.2
github.com/ipfs/go-dagwriter v0.0.0-20210330014411-6fb9a511eaff
github.com/ipfs/go-dagwriter v0.0.0-20210410024744-41183870fd1b
github.com/ipfs/go-datastore v0.4.5
github.com/ipfs/go-detect-race v0.0.1
github.com/ipfs/go-ds-badger v0.2.6
github.com/ipfs/go-ds-flatfs v0.4.5
github.com/ipfs/go-ds-leveldb v0.4.2
github.com/ipfs/go-ds-measure v0.1.0
github.com/ipfs/go-fetcher v1.2.0
github.com/ipfs/go-fetcher v1.2.1-0.20210410025415-5325cff258c0
github.com/ipfs/go-filestore v0.0.3
github.com/ipfs/go-fs-lock v0.0.6
github.com/ipfs/go-graphsync v0.8.0
Expand All @@ -53,12 +53,12 @@ require (
github.com/ipfs/go-metrics-interface v0.0.1
github.com/ipfs/go-metrics-prometheus v0.0.2
github.com/ipfs/go-mfs v0.1.2
github.com/ipfs/go-path v0.0.10-0.20210405201800-40f1060226f7
github.com/ipfs/go-path v0.0.10-0.20210410022936-5bb583a8f6e8
github.com/ipfs/go-pinning-service-http-client v0.1.0
github.com/ipfs/go-unixfs v0.2.4
github.com/ipfs/go-unixfsnode v1.1.1
github.com/ipfs/go-verifcid v0.0.1
github.com/ipfs/interface-go-ipfs-core v0.4.1-0.20210405202020-ca57b3c9337b
github.com/ipfs/interface-go-ipfs-core v0.4.1-0.20210410030100-56c2e678cb62
github.com/ipld/go-car v0.2.1-0.20210312021557-7afab98d034f
github.com/ipld/go-codec-dagpb v1.2.1-0.20210405170603-d0b86f7623c2 // indirect
github.com/ipld/go-ipld-prime v0.9.1-0.20210402181957-7406578571d1
Expand Down
27 changes: 9 additions & 18 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@ github.com/ipfs/go-cid v0.0.7 h1:ysQJVJA3fNDF1qigJbsSQOdjhVLsOEoPdh0+R97k3jY=
github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I=
github.com/ipfs/go-cidutil v0.0.2 h1:CNOboQf1t7Qp0nuNh8QMmhJs0+Q//bRL1axtCnIB1Yo=
github.com/ipfs/go-cidutil v0.0.2/go.mod h1:ewllrvrxG6AMYStla3GD7Cqn+XYSLqjK0vc+086tB6s=
github.com/ipfs/go-dagwriter v0.0.0-20210330014411-6fb9a511eaff h1:6Qk1I0swNwONRzL7xiivsNT3tqpaMW+C0dTPg6haYkc=
github.com/ipfs/go-dagwriter v0.0.0-20210330014411-6fb9a511eaff/go.mod h1:rytn1TKuQ3zg9oMJxoVsSUt7BXonIRWxChvDR6LkG98=
github.com/ipfs/go-dagwriter v0.0.0-20210410024744-41183870fd1b h1:iGEokY1rwqatEY6XxWQ/4fzGrdmOpvSM9YrudFMg8ww=
github.com/ipfs/go-dagwriter v0.0.0-20210410024744-41183870fd1b/go.mod h1:rytn1TKuQ3zg9oMJxoVsSUt7BXonIRWxChvDR6LkG98=
github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE=
github.com/ipfs/go-datastore v0.0.5/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE=
github.com/ipfs/go-datastore v0.1.0/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE=
Expand Down Expand Up @@ -389,8 +389,10 @@ github.com/ipfs/go-ds-leveldb v0.4.2 h1:QmQoAJ9WkPMUfBLnu1sBVy0xWWlJPg0m4kRAiJL9
github.com/ipfs/go-ds-leveldb v0.4.2/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s=
github.com/ipfs/go-ds-measure v0.1.0 h1:vE4TyY4aeLeVgnnPBC5QzKIjKrqzha0NCujTfgvVbVQ=
github.com/ipfs/go-ds-measure v0.1.0/go.mod h1:1nDiFrhLlwArTME1Ees2XaBOl49OoCgd2A3f8EchMSY=
github.com/ipfs/go-fetcher v1.2.0 h1:2eRF8JQCkCwsXn8c0VmGrl9ksCLG1Ll36WSId7Ld30Q=
github.com/ipfs/go-fetcher v1.2.0/go.mod h1:RFvn2LiuWIfyXt3ChONqIvQfsbEhBYWhwUeatYjFPIA=
github.com/ipfs/go-fetcher v1.2.1-0.20210410011454-571518e2eca7/go.mod h1:mlpkadjgVO4a/SW822rtK2b7vIAjtvtw/f6ensvCImI=
github.com/ipfs/go-fetcher v1.2.1-0.20210410025415-5325cff258c0 h1:37yQd+iMV4xe0wZInKqbO76Lgbbtb7jrt3au6T8X4c0=
github.com/ipfs/go-fetcher v1.2.1-0.20210410025415-5325cff258c0/go.mod h1:mlpkadjgVO4a/SW822rtK2b7vIAjtvtw/f6ensvCImI=
github.com/ipfs/go-filestore v0.0.3 h1:MhZ1jT5K3NewZwim6rS/akcJLm1xM+r6nz6foeB9EwE=
github.com/ipfs/go-filestore v0.0.3/go.mod h1:dvXRykFzyyXN2CdNlRGzDAkXMDPyI+D7JE066SiKLSE=
github.com/ipfs/go-fs-lock v0.0.6 h1:sn3TWwNVQqSeNjlWy6zQ1uUGAZrV3hPOyEA6y1/N2a0=
Expand Down Expand Up @@ -482,11 +484,10 @@ github.com/ipfs/go-metrics-prometheus v0.0.2/go.mod h1:ELLU99AQQNi+zX6GCGm2lAgnz
github.com/ipfs/go-mfs v0.1.2 h1:DlelNSmH+yz/Riy0RjPKlooPg0KML4lXGdLw7uZkfAg=
github.com/ipfs/go-mfs v0.1.2/go.mod h1:T1QBiZPEpkPLzDqEJLNnbK55BVKVlNi2a+gVm4diFo0=
github.com/ipfs/go-path v0.0.7/go.mod h1:6KTKmeRnBXgqrTvzFrPV3CamxcgvXX/4z79tfAd2Sno=
github.com/ipfs/go-path v0.0.10-0.20210324191207-6a600cd3f256 h1:0Tyb3Na34eTu5GpHDFit6f4296U7qRoG/0j1/XQYHmY=
github.com/ipfs/go-path v0.0.10-0.20210324191207-6a600cd3f256/go.mod h1:QHYtDmpHe3xD5RQSkoco+BM7Vv0sg/tLHWv000t60sw=
github.com/ipfs/go-path v0.0.10-0.20210405185612-bc2ed47be17e/go.mod h1:StkbCaRBz+urcOcgVoj/6w4wwT96uwnJjDSM7c4UJw4=
github.com/ipfs/go-path v0.0.10-0.20210405201800-40f1060226f7 h1:Sh4fY6j1NxxwbN7ux9gzKC8ve85Jhs5TwxZMJOuLXCo=
github.com/ipfs/go-path v0.0.10-0.20210405201800-40f1060226f7/go.mod h1:g8egwymo/MjfPUu/ojghk4YQKwjn6MGO+UUv4eUw08M=
github.com/ipfs/go-path v0.0.10-0.20210410022936-5bb583a8f6e8 h1:9i5lcAA82lk26dIS9HLcRDb44NQVUfiCjdVPHQBRNgc=
github.com/ipfs/go-path v0.0.10-0.20210410022936-5bb583a8f6e8/go.mod h1:4ioMNxEamO9lLAwhIZwTaeR5qkcc3lp1PIPlEDuEa+U=
github.com/ipfs/go-peertaskqueue v0.0.4/go.mod h1:03H8fhyeMfKNFWqzYEVyMbcPUeYrqP1MX6Kd+aN+rMQ=
github.com/ipfs/go-peertaskqueue v0.1.0/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U=
github.com/ipfs/go-peertaskqueue v0.1.1/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U=
Expand All @@ -497,35 +498,25 @@ github.com/ipfs/go-pinning-service-http-client v0.1.0/go.mod h1:tcCKmlkWWH9JUUkK
github.com/ipfs/go-unixfs v0.1.0/go.mod h1:lysk5ELhOso8+Fed9U1QTGey2ocsfaZ18h0NCO2Fj9s=
github.com/ipfs/go-unixfs v0.2.4 h1:6NwppOXefWIyysZ4LR/qUBPvXd5//8J3jiMdvpbw6Lo=
github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw=
github.com/ipfs/go-unixfsnode v1.0.0 h1:H9ZFhw3Zl0w0m4RbGdRsJc3I1DXUkiJCDjkVqZSmj3c=
github.com/ipfs/go-unixfsnode v1.0.0/go.mod h1:xmhbd5wPvHYzJAGVJFJ4Oi+U5NGEiax0TatZLOq2imk=
github.com/ipfs/go-unixfsnode v1.0.1-0.20210402214142-de45652f269f/go.mod h1:Xk4qvd3Nb8H31OJapZrLDAE4aBNmKUCvAzypIUZ3ACQ=
github.com/ipfs/go-unixfsnode v1.1.0/go.mod h1:Xk4qvd3Nb8H31OJapZrLDAE4aBNmKUCvAzypIUZ3ACQ=
github.com/ipfs/go-unixfsnode v1.1.1 h1:YjYe5nQgkloOVlyRUumVGke7ngRFRZmtbI866YkTUgM=
github.com/ipfs/go-unixfsnode v1.1.1/go.mod h1:Xk4qvd3Nb8H31OJapZrLDAE4aBNmKUCvAzypIUZ3ACQ=
github.com/ipfs/go-verifcid v0.0.1 h1:m2HI7zIuR5TFyQ1b79Da5N9dnnCP1vcu2QqawmWlK2E=
github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0=
github.com/ipfs/interface-go-ipfs-core v0.4.0 h1:+mUiamyHIwedqP8ZgbCIwpy40oX7QcXUbo4CZOeJVJg=
github.com/ipfs/interface-go-ipfs-core v0.4.0/go.mod h1:UJBcU6iNennuI05amq3FQ7g0JHUkibHFAfhfUIy927o=
github.com/ipfs/interface-go-ipfs-core v0.4.1-0.20210405191608-cfc1d17466f4 h1:+7FVaqFCwhHAr5SMI1EoM4XA2+qKbHf4llNAUd6FjfI=
github.com/ipfs/interface-go-ipfs-core v0.4.1-0.20210405191608-cfc1d17466f4/go.mod h1:lP0qUmSsahKLQT3JcjfDnOlT89VUU5L4bi0/8ARH5Fw=
github.com/ipfs/interface-go-ipfs-core v0.4.1-0.20210405202020-ca57b3c9337b h1:IxxQF7840h6jcR5JdLsBlzgCUs/EzaQj4t+yO8ZJv0s=
github.com/ipfs/interface-go-ipfs-core v0.4.1-0.20210405202020-ca57b3c9337b/go.mod h1:uI4Dq/srB5Ecylh+4oYn7iiSgp1gluu/2KVv9OsQlP0=
github.com/ipfs/interface-go-ipfs-core v0.4.1-0.20210410030100-56c2e678cb62 h1:PJ5gH7jjJtQ8OT+iACcolpMnvhCpfRtpegWfMF785uk=
github.com/ipfs/interface-go-ipfs-core v0.4.1-0.20210410030100-56c2e678cb62/go.mod h1:leFsW1rX9F7+0N9Tss2kR82w9oafDmczBdE8z4VWGRo=
github.com/ipld/go-car v0.2.1-0.20210312021557-7afab98d034f h1:417+6v+keLsNoVi2vPJamDsW/ewuAs2uE3hlFt5muGs=
github.com/ipld/go-car v0.2.1-0.20210312021557-7afab98d034f/go.mod h1:kHunAcD305JwLqwI9MfKvuQu4ljwWRZQWfDWPrkkhcg=
github.com/ipld/go-codec-dagpb v1.0.2-0.20210308154810-d05d02fa186e/go.mod h1:oYexiw3WkBIVD5UTNkVuOd0iyEcLxqytAQa90F3nH9M=
github.com/ipld/go-codec-dagpb v1.2.0/go.mod h1:6nBN7X7h8EOsEejZGqC7tej5drsdBAXbMHyBT+Fne5s=
github.com/ipld/go-codec-dagpb v1.2.1-0.20210330082435-8ec6b0fbad18 h1:TpjpdzJdasjzZ2xw7rmoj4+u9WBkWBTKBYGcyyLXX68=
github.com/ipld/go-codec-dagpb v1.2.1-0.20210330082435-8ec6b0fbad18/go.mod h1:GMLfso6KSkYJlIbd2cGKdGMe/hM5/IukeXRQ+u6zTrQ=
github.com/ipld/go-codec-dagpb v1.2.1-0.20210405170603-d0b86f7623c2 h1:m/ZZEoOdswHrrcikTC+fX4x6tnevJs0hoyNzijlT41A=
github.com/ipld/go-codec-dagpb v1.2.1-0.20210405170603-d0b86f7623c2/go.mod h1:GMLfso6KSkYJlIbd2cGKdGMe/hM5/IukeXRQ+u6zTrQ=
github.com/ipld/go-ipld-prime v0.7.1-0.20210225173718-8fef5312eb12/go.mod h1:0xEgdD6MKbZ1vF0GC+YcR/C4SQCAlRuOjIJ2i0HxqzM=
github.com/ipld/go-ipld-prime v0.7.1-0.20210312004928-8a500e6b8a62/go.mod h1:ZwznT3awHhuBoB0SgGxSo8SZEg6XbQtsZ6WahL9r9z0=
github.com/ipld/go-ipld-prime v0.9.0 h1:N2OjJMb+fhyFPwPnVvJcWU/NsumP8etal+d2v3G4eww=
github.com/ipld/go-ipld-prime v0.9.0/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8=
github.com/ipld/go-ipld-prime v0.9.0/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8=
github.com/ipld/go-ipld-prime v0.9.1-0.20210324083106-dc342a9917db h1:kFwGn8rXa/Z31ev1OFNQsYeNKNCdifnTPl/NvPy5L38=
github.com/ipld/go-ipld-prime v0.9.1-0.20210324083106-dc342a9917db h1:kFwGn8rXa/Z31ev1OFNQsYeNKNCdifnTPl/NvPy5L38=
github.com/ipld/go-ipld-prime v0.9.1-0.20210324083106-dc342a9917db/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8=
github.com/ipld/go-ipld-prime v0.9.1-0.20210324083106-dc342a9917db/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8=
github.com/ipld/go-ipld-prime v0.9.1-0.20210402181957-7406578571d1 h1:dIKSj9r+CCXz9t6p4TfbDx34CfSjLfasRZf37SXlNjg=
Expand Down

0 comments on commit 12dff57

Please sign in to comment.