Skip to content

Commit

Permalink
Libs 1.0.16 and fix remaining creator-node refs (#1068)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondjacobson committed Nov 17, 2020
1 parent aee96a4 commit 3450eb9
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 58 deletions.
191 changes: 138 additions & 53 deletions creator-node/package-lock.json

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

2 changes: 1 addition & 1 deletion creator-node/package.json
Expand Up @@ -18,7 +18,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@audius/libs": "^1.0.14",
"@audius/libs": "^1.0.16",
"JSONStream": "^1.3.5",
"axios": "^0.19.0",
"base64-url": "^2.2.0",
Expand Down
2 changes: 1 addition & 1 deletion creator-node/src/middlewares.js
Expand Up @@ -123,7 +123,7 @@ async function getOwnEndpoint (req) {

const spId = await libs.ethContracts.ServiceProviderFactoryClient.getServiceProviderIdFromEndpoint(creatorNodeEndpoint)
if (!spId) throw new Error('Cannot get spId for node')
const spInfo = await libs.ethContracts.ServiceProviderFactoryClient.getServiceEndpointInfo('creator-node', spId)
const spInfo = await libs.ethContracts.ServiceProviderFactoryClient.getServiceEndpointInfo('content-node', spId)

// Confirm on-chain endpoint exists and is valid FQDN
// Error condition is met if any of the following are true
Expand Down
2 changes: 1 addition & 1 deletion creator-node/src/utils.js
Expand Up @@ -260,7 +260,7 @@ async function getAllRegisteredCNodes (libs) {
return JSON.parse(cnodesList)
}

let creatorNodes = (await libs.ethContracts.ServiceProviderFactoryClient.getServiceProviderList('creator-node'))
let creatorNodes = (await libs.ethContracts.ServiceProviderFactoryClient.getServiceProviderList('content-node'))
creatorNodes = creatorNodes.filter(node => node.endpoint !== config.get('creatorNodeEndpoint'))
redis.set(cacheKey, JSON.stringify(creatorNodes), 'EX', 60 * 30) // cache this for 30 minutes
return creatorNodes
Expand Down
2 changes: 1 addition & 1 deletion creator-node/test/lib/libsMock.js
Expand Up @@ -21,7 +21,7 @@ function getLibsMock () {
endpoint: 'http://localhost:5000',
owner: '0x1eC723075E67a1a2B6969dC5CfF0C6793cb36D25',
spID: '1',
type: 'creator-node',
type: 'content-node',
blockNumber: 1234,
delegateOwnerWallet: '0x1eC723075E67a1a2B6969dC5CfF0C6793cb36D25'
})
Expand Down
2 changes: 1 addition & 1 deletion creator-node/test/syncAssets/sampleExport.json
Expand Up @@ -1941,7 +1941,7 @@
},
"signer": "0x1eC723075E67a1a2B6969dC5CfF0C6793cb36D25",
"version": "0.3.22",
"service": "creator-node",
"service": "content-node",
"timestamp": "2020-10-02T18:48:17.781Z",
"signature": "0x0b15fd18955ac3c610795c2e3dfa396a25a708255814e0133a2710379255078450a22a7dfdfbed4d284b8239f7e4c47af591da894e54986539f38beb7091f9f51c"
}

0 comments on commit 3450eb9

Please sign in to comment.