-
Notifications
You must be signed in to change notification settings - Fork 83
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
feat(ipfs-manager): adapt RPC usage with POST methods #871
Conversation
@@ -14,7 +14,7 @@ const invalidHostIpfsGatewayConnection: StorageTypes.IIpfsGatewayConnection = { | |||
host: 'nonexistent', | |||
port: 5001, | |||
protocol: StorageTypes.IpfsGatewayProtocol.HTTP, | |||
timeout: 1000, | |||
timeout: 1500, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what changed, but without this the test fails...
@@ -76,24 +76,24 @@ describe('Ipfs manager', () => { | |||
it('allows to pin one file ipfs', async () => { | |||
await ipfsManager.add(content); | |||
const pinnedHash = await ipfsManager.pin([hash]); | |||
expect(hash).toBe(pinnedHash[0]); | |||
expect(pinnedHash[0]).toBe(hash); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong order for expect
}); | ||
|
||
it('timeout errors should not generate any retry', async () => { | ||
it('timeout errors should generate retry', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMPORTANT. We now want to retry on timeout
@@ -3,9 +3,9 @@ import { BigNumber } from 'ethers'; | |||
|
|||
// This contains default values used to use Ethereum Network and IPFS | |||
// if information are not provided by the user | |||
const config: any = { | |||
const config = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated, annying any
|
||
'/dns4/ipfs-survival.request.network/tcp/4001/ipfs/Qmb6a5DH45k8JwLdLVZUhRhv1rnANpsbXjtsH41esGhNCh', | ||
], | ||
expectedBootstrapNodes: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the format of the address changed, this accounts for the change while supporting older format
676ed09
to
d5d2652
Compare
Co-authored-by: Alexandre ABRIOUX <alexandre-abrioux@users.noreply.github.com>
modern versions of IPFS now require using POST for every calls
ipfs/kubo#7097
ipfs/js-ipfs#2971
Also in this PR: replace
axios-retry
since it seems to not retry POST requests