@1sat/wallet-toolbox 0.0.43 → 0.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/wallet/fullSync.js +10 -0
- package/package.json +1 -1
package/dist/wallet/fullSync.js
CHANGED
|
@@ -47,8 +47,14 @@ export async function fullSync(options) {
|
|
|
47
47
|
// DEBUG CHECKPOINT 2: Log PUSH chunk contents
|
|
48
48
|
const pushBaskets = chunk.outputBaskets || [];
|
|
49
49
|
const pushOutputs = chunk.outputs || [];
|
|
50
|
+
const pushTransactions = chunk.transactions || [];
|
|
50
51
|
const push1SatOutputs = pushOutputs.filter((o) => o.satoshis === 1);
|
|
51
52
|
console.log("=== CHECKPOINT 2: PUSH CHUNK ===");
|
|
53
|
+
console.log("[PUSH] Chunk #:", chunkCount + 1);
|
|
54
|
+
console.log("[PUSH] Transactions:", pushTransactions.length);
|
|
55
|
+
for (const t of pushTransactions) {
|
|
56
|
+
console.log(` Tx: transactionId=${t.transactionId}, txid=${t.txid?.slice(0, 16) ?? "null"}..., status=${t.status}`);
|
|
57
|
+
}
|
|
52
58
|
console.log("[PUSH] Output Baskets:", pushBaskets.length);
|
|
53
59
|
for (const b of pushBaskets) {
|
|
54
60
|
console.log(` Basket: id=${b.basketId}, name="${b.name}"`);
|
|
@@ -62,7 +68,11 @@ export async function fullSync(options) {
|
|
|
62
68
|
}
|
|
63
69
|
console.log("=== END CHECKPOINT 2 ===");
|
|
64
70
|
// Send chunk to remote
|
|
71
|
+
const chunkJson = JSON.stringify(chunk);
|
|
72
|
+
console.log(`[PUSH] Chunk size: ${(chunkJson.length / 1024).toFixed(1)} KB`);
|
|
73
|
+
console.log("[PUSH] Sending chunk to remote...");
|
|
65
74
|
const result = await remoteStorage.processSyncChunk(args, chunk);
|
|
75
|
+
console.log(`[PUSH] Server response: inserts=${result.inserts}, updates=${result.updates}, done=${result.done}`);
|
|
66
76
|
pushInserts += result.inserts;
|
|
67
77
|
pushUpdates += result.updates;
|
|
68
78
|
chunkCount++;
|