Todas as lições · CKB node, RPC and indexer · Começa aqui · Glossário
Advancing devnet median time for time-lock testsPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
With the IntegrationTest RPC module enabled, call get_block_template, set current_time (hex ms) to a future value, and submit it with generate_block_with_template, block by block. Since/timestamp checks use the median time, which only moves after many future-dated blocks. Poll get_blockchain_info.median_time until it reaches the target rather than mining one far-future block.
Porque importa: A single future-dated block barely moves the median of recent block timestamps, so median_time stays below the target and time-locked spends stay immature, which fails the scenario's 'median time did not reach the target' check.
Padrão
t = get_block_template(null,null,null); t.current_time = hex(tipMs + step); generate_block_with_template(t); loop until median_time >= target- Conceitos
- Testing and devnet, Since and time locks
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-11-15
- Última mudança
- 2026-11-15
- Última verificação
- 2026-11-19
- Verificação contra o commit
- certa: a lição sai do commit e continua a valer no código de hoje
Fontes (1)
- 2026-11-15 · psawyerberlin/ckb-revocable-timelock · mais deste projeto
Mais sobre CKB node, RPC and indexer
- Decoding the packed epoch field (number, index, length)
- get_transaction returns an object with a null transaction for rejected and unknown txs
- CKB log subscription notifications may carry params.result as a JSON string
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Advancing devnet median time for time-lock tests", CKB lessons, https://pulse.lusocryptolabs.com/learned/node/advancing-devnet-median-time-for-time-lock-tests, CC BY 4.0, last changed 2026-11-15.