Skip to content

Json - #73

Merged
pin2t merged 8 commits into
masterfrom
json
Jul 30, 2026
Merged

Json#73
pin2t merged 8 commits into
masterfrom
json

Conversation

@pin2t

@pin2t pin2t commented Jul 30, 2026

Copy link
Copy Markdown
Owner

No description provided.

pin2t added 8 commits July 30, 2026 20:54
- Convert marshal/unmarshal in rates, watches, blocks, miners-stat buckets
- Remove msgpack encode/decode endpoints and raw/msgpack mode toggle from dbui
- Drop github.com/Basekick-Labs/msgpack/v6 dependency
- All tests pass
- rateRecord.Cents int64 replaces USD float64 in stored JSON
- rateRecord.Time marked json:"-" — key already holds the timestamp
- At() and hasHistory() derive time from the bbolt key instead
- All tests pass
…lock 0

When no cursor is set the collector now starts from genesis instead
of only the last initialWindow blocks. On a fresh install this gives
complete history rather than a partial window.
Replaces Time field with explicit Timestamp int64 and JSON tags on all
fields so the stored JSON is self-describing: {"timestamp":...,"price":...,
"market_cap":...,"volume_24h":...}
collectBlocks now gathers up to blocksChunkSize (1000) blocks in memory,
then flushes them all plus the cursor in a single DB transaction.
On failure the cursor stays put and the next run retries the whole chunk.
Removed the now-unused cacheBlockHeight helper.
…alls

Uses a small generic LRU built on container/list, zero external dependencies.
Cached by block hash so recently fetched blocks avoid repeat RPC round-trips.
@pin2t pin2t self-assigned this Jul 30, 2026
@pin2t
pin2t merged commit 05ca43c into master Jul 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant