summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2020-01-10 18:18:03 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2020-01-10 18:18:03 -0800
commit919988a69438ef4eab174f26e9fc98662a324769 (patch)
tree9508cf77f042bf8d73dfaea07fe7a1a6d72c7f76
parent3223a360d0e70f75497aecf8c033a4f987335b5b (diff)
downloadstandingwithresilience-919988a69438ef4eab174f26e9fc98662a324769.tar.gz
standingwithresilience-919988a69438ef4eab174f26e9fc98662a324769.zip
workaround to issue
-rwxr-xr-xgit-maintenance/store.sh9
-rw-r--r--magic/mysterious-bsvup-error-shift.patch30
2 files changed, 38 insertions, 1 deletions
diff --git a/git-maintenance/store.sh b/git-maintenance/store.sh
index 432998f..3e442a2 100755
--- a/git-maintenance/store.sh
+++ b/git-maintenance/store.sh
@@ -145,7 +145,14 @@ if [ "$(curl -s "$URLPFX"/dog.sh | sha256sum)" = "$(cat encrypted/dog.sh | sha25
# some imagine anger to process disconnected parts.
cd "$MAINTDIR"
-node bsvup/cli.js upload -f "$GITDIR"/encrypted -t dir -p "${PASS#pass:}" -v # -b
+node bsvup/cli.js upload -f "$GITDIR"/encrypted -t dir -p "${PASS#pass:}" -v || {
+ # -b
+ echo
+ echo "I found a small adjustment that helped with random corruption error:"
+ echo " patch -p1 < magic/mysterious*.patch"
+ echo "I wish I had the capacity to resolve the problem for real."
+ echo
+}
# 'is this a good way to be' <- habit's task for self and others, by living
# the best way to be it can.
diff --git a/magic/mysterious-bsvup-error-shift.patch b/magic/mysterious-bsvup-error-shift.patch
new file mode 100644
index 0000000..4f75a30
--- /dev/null
+++ b/magic/mysterious-bsvup-error-shift.patch
@@ -0,0 +1,30 @@
+index e0384a0..03f36e2 100644
+--- a/git-maintenance/bsvup/api.js
++++ b/git-maintenance/bsvup/api.js
+@@ -129,6 +129,12 @@ async function broadcast(tx, unBroadcast){
+ async function tryBroadcastAll(TXs){
+ var toBroadcast = TXs? TXs : Cache.loadUnbroadcast()
+ var unBroadcast = []
++// console.log("PRE")
++ let tx = toBroadcast[0]
++// console.log('WRITE TO: ' + `./.bsv/tx/${tx.id}` + ' ...')
++// console.log('writeFileSync = ' + fs.writeFileSync)
++ fs.writeFileSync(`./.bsv/tx/${tx.id}`, tx.toString())
++// console.log("POST")
+ for (let tx of toBroadcast) {
+ try {
+ await broadcast(tx, unBroadcast)
+index bbe9293..cb00653 100644
+--- a/git-maintenance/bsvup/cache.js
++++ b/git-maintenance/bsvup/cache.js
+@@ -65,7 +65,10 @@ function loadFileRecord(sha1){
+ }
+
+ function saveTX(tx){
++// console.log("fs = " + fs);
++// console.log("fs.writeFileSync = " + fs.writeFileSync);
+ fs.writeFileSync(`./.bsv/tx/${tx.id}`, tx.toString())
++// console.log("pos")
+ }
+
+ function loadTX(txid){