blob: 4f75a30cf5d597055dfcc9d06497b953d8c5a630 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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){
|