lockunspent help docs are (partially) wrong #4163

issue posita opened this issue on May 9, 2014
  1. posita commented at 7:36 PM on May 9, 2014: contributor
    % bitcoin-cli help lockunspent
    lockunspent unlock [{"txid":"txid","vout":n},...]
    ...
    Temporarily lock (lock=true) or unlock (lock=false) specified transaction outputs.
    ...
    Arguments:
    1. unlock            (boolean, required) Whether to unlock (true) or lock (false) the specified transactions
    

    I'm not surprised this got screwed up. lockunspent true to unlock and lockunspent false to lock is totally counter intuitive and actually contradicts an otherwise self-documenting command. Given the code (if param[0] is true then unlock, otherwise lock), the command _probably_ should have been named unlockunspent. The Right Thing™ would be to fix the semantics of the first param to mean "lock" rather than "unlock" if the current command name is to be kept. But here's to living with a legacy of bad decisions upon which others have come to rely. :o)

    (The Wiki also needs updating.)

  2. jgarzik closed this on May 10, 2014

  3. jgarzik referenced this in commit ceb0757a3e on May 10, 2014
  4. laanwj referenced this in commit 78363dc991 on May 12, 2014
  5. MathyV referenced this in commit 4cf619d2b9 on Nov 3, 2014
  6. MarcoFalke locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me