Todas as lições · Rust scripts and ckb-std · Começa aqui · Glossário
Cheque lock receiver path must return the cell's capacity to the senderPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
When a Cheque lock cell (RFC 0039) is spent on the receiver path, rule 1.b.ii requires the Cheque cell's CKB capacity to go back to the sender's lock. An output paying that CKB to the receiver fails with Cheque error 8 (SenderCapacityNotSame). So the Cheque lock cannot be used to deliver plain CKB to the receiver, and in this project's tests it also blocked an owner placed in the receiver role from reclaiming their own CKB.
Porque importa: A claim transaction that pays the Cheque cell's CKB to the receiver is rejected with Cheque error 8, so a design that counts on the Cheque lock to hand plain CKB to the receiver cannot work.
Padrão
assert!(err.to_string().contains("error code 8"), "expected Cheque error 8, got: {err}");Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- salmansarwarr/Tranfr:
tests/src/composition.rs,tests/src/lib.rs
- Conceitos
- Testing and devnet, Capacity and cell size
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-11-09
- Última mudança
- 2026-11-09
- Ú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-09 · salmansarwarr/Tranfr · mais deste projeto
Mais sobre Rust scripts and ckb-std
- ckb-testtool runs scripts only, so node transaction verifiers must be added in tests
- ckb-std C shim needs a RISC-V C toolchain (clang) in CI
- Median time vs tip timestamp for deadlines
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Cheque lock receiver path must return the cell's capacity to the sender", CKB lessons, https://pulse.lusocryptolabs.com/learned/scripts/cheque-lock-receiver-path-must-return-the-cell-s-capacity-to, CC BY 4.0, last changed 2026-11-09.