CKB Pulse
Lessons

What CKB learned

Start here · Glossary · Test yourself · Feed

nervosnetwork/ckb-cli

Lessons from nervosnetwork/ckb-cli

github.com/nervosnetwork/ckb-cli

Do you maintain this project? Confirm its lessons in one issue

1 lessons found. All lessons

Handle None from ckb_sdk Since::extract_metric for invalid since valuesWorkingFrom one fix

A raw since u64 can carry the reserved metric flag 0b11 (e.g. 0x6000_0000_0000_0000), for which ckb_sdk::Since::extract_metric() returns None, and a timestamp metric value can exceed what chrono can represent. Code that formats since values received from RPC should handle both cases instead of unwrapping, as ckb-cli now does by printing "invalid since" or "invalid".

#Since and time locks #Data encoding (molecule, hex, bigints) · Sources (1) · 2026-11-09

Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. JSON · Want a lesson changed or removed? Open an issue.