Rain: add debug log to diagnose missing drops

This commit is contained in:
you
2026-03-22 08:06:33 +00:00
parent fc05b94801
commit c2a2b36dfc
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -90,7 +90,7 @@
<script src="nodes.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
<script src="traces.js?v=1774135052" onerror="console.error('Failed to load:', this.src)"></script>
<script src="analytics.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
<script src="live.js?v=1774166632" onerror="console.error('Failed to load:', this.src)"></script>
<script src="live.js?v=1774166793" onerror="console.error('Failed to load:', this.src)"></script>
<script src="observers.js?v=1774290000" onerror="console.error('Failed to load:', this.src)"></script>
<script src="observer-detail.js?v=1774028201" onerror="console.error('Failed to load:', this.src)"></script>
<script src="node-analytics.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
+2 -1
View File
@@ -1796,7 +1796,8 @@
function addRainDrop(pkt) {
if (!rainCanvas || !matrixRain) return;
const rawHex = pkt.raw || pkt.raw_hex || (pkt.packet && pkt.packet.raw_hex) || '';
if (!rawHex) return; // no real packet bytes — don't fake it
console.log('[rain] pkt keys:', Object.keys(pkt), 'raw:', !!pkt.raw, 'raw_hex:', !!pkt.raw_hex, 'packet.raw_hex:', !!(pkt.packet && pkt.packet.raw_hex), 'rawHex len:', rawHex.length);
if (!rawHex) return;
const decoded = pkt.decoded || {};
const hops = decoded.path?.hops || [];
const hopCount = Math.max(1, hops.length);