arweave-uploader
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -47,5 +47,4 @@ "use strict"; | ||
var arweave = arweave_1.default.init({ | ||
host: 'lon-1.arweave.net', | ||
protocol: 'http', | ||
port: 1984 | ||
host: 'arweave.net', | ||
protocol: 'https', | ||
}); | ||
@@ -72,3 +71,3 @@ var upload = function (tx, wallet, userReference) { return __awaiter(void 0, void 0, void 0, function () { | ||
status = _a.sent(); | ||
wait = 6; | ||
wait = 24; | ||
_a.label = 4; | ||
@@ -128,3 +127,3 @@ case 4: | ||
if (!(status === 404 || status === 410)) return [3, 25]; | ||
tries = 6; | ||
tries = 12; | ||
_a.label = 18; | ||
@@ -158,4 +157,6 @@ case 18: return [4, utils_1.sleep(40000)]; | ||
case 25: | ||
logger_1.logger(uRef, 'Possible failure, no retry. Status ', status); | ||
throw new Error("Possible failure. Txid: " + tx.id + " Status: " + status); | ||
logger_1.logger(uRef, 'Possible failure. Status ', status, '. Retrying post tx'); | ||
tx.addTag('Retry', (new Date().valueOf() / 1000).toString()); | ||
return [4, exports.upload(tx, wallet)]; | ||
case 26: return [2, _a.sent()]; | ||
} | ||
@@ -162,0 +163,0 @@ }); |
{ | ||
"name": "arweave-uploader", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "", | ||
@@ -34,4 +34,4 @@ "main": "dist/index.js", | ||
"ansi-colors": "^4.1.1", | ||
"arweave": "^1.10.0" | ||
"arweave": "^1.10.13" | ||
} | ||
} |
@@ -1,7 +0,7 @@ | ||
# arweave-uploader | ||
# arweave-uploader (work in progress) | ||
Arweave Uploader - detect ~~and handle~~ arweave upload failures | ||
Arweave Uploader - detect and handle arweave upload failures | ||
** N.B. this only works for value transfer or very small data txs | ||
** N.B. retry is currently disabled | ||
** N.B. Warning! Tx retry will create multiple txs during periods of unusually high network/gateway load | ||
@@ -14,3 +14,3 @@ ## Installation | ||
## Example Usage | ||
## Example Usage - N.B. API subject to constant change ;-) | ||
@@ -17,0 +17,0 @@ ``` |
Sorry, the diff of this file is not supported yet
46627
264
Updatedarweave@^1.10.13