finished logger paths and details

This commit is contained in:
bill bittner 2017-06-19 20:22:23 -07:00
parent 5f7177540c
commit dd70c19b64
9 changed files with 26 additions and 25 deletions

View file

@ -35,13 +35,14 @@ module.exports = {
.then(claim => {
// if a matching claim is found locally...
if (claim) {
logger.debug(`A mysql record was found for ${claimId}`);
// if the outpoint's match return it
if (claim.dataValues.outpoint === freePublicClaimOutpoint) {
logger.debug(`local outpoint matched for ${name} ${claimId} `);
logger.debug(`local outpoint matched for ${claimId}`);
resolve(claim.dataValues);
// if the outpoint's don't match, fetch updated claim
} else {
logger.debug(`local outpoint did not match ${name} ${claimId}`);
logger.debug(`local outpoint did not match for ${claimId}`);
getClaimAndHandleResponse(freePublicClaimUri, resolve, reject);
}
// ... otherwise use daemon to retrieve it
@ -73,14 +74,14 @@ module.exports = {
.then(claim => {
// if a found locally...
if (claim) {
logger.debug(`A File record was found for ${claimName}/${claimId}`);
logger.debug(`A mysql record was found for ${claimId}`);
// if the outpoint's match return it
if (claim.dataValues.outpoint === resolvedOutpoint) {
logger.debug('local outpoint matched');
logger.debug(`local outpoint matched for ${claimId}`);
resolve(claim.dataValues);
// if the outpoint's don't match, fetch updated claim
} else {
logger.debug('local outpoint did not match');
logger.debug(`local outpoint did not match for ${claimId}`);
getClaimAndHandleResponse(uri, resolve, reject);
}
// ... otherwise use daemon to retrieve it