Raw transaction API needs a way to freeze inputs #1637

issue gmaxwell opened this issue on July 29, 2012
  1. gmaxwell commented at 6:07 AM on July 29, 2012: contributor

    Right now it's really easy to stomp on yourself when using the rawtransactions api. For example, you write a transaction with some inputs of yours, you pass it off to another party to do $whatever, etc... and in the meantime you send some funds and those inputs get used out from under you.

    Having a lock /unlock txid:vout| [comment] that prevents automatic coin selection from taking the inputs would solve that neatly.

  2. sipa commented at 2:06 PM on July 31, 2012: member

    This is indeed a serious issue if you plan to use both wallet-managed transactions and raw transactions.

    Before something like you suggest here is implemented, I suppose the raw transaction interface needs a warning "do not combine with high-level wallet functions".

  3. laanwj commented at 11:02 AM on December 7, 2013: member

    Isn't this sort-of what lockunspent does?

  4. gmaxwell commented at 5:37 PM on December 7, 2013: contributor

    @laanwj Yes— sort of (see the date, this was written long before lockunspent)— though lockunspent isn't saved. Ultimately I think we need something that gets saved, though that brings up some extra challenges like needing to have a separated "locked balance" from "balance" so that uses don't get funds stuck in their wallet and have no way to figure out how (because they have balance they can't spend, or balance that isn't shown)

  5. laanwj added the label Wallet on May 9, 2014
  6. jgarzik commented at 2:12 PM on December 31, 2014: contributor

    Closing as this is mostly solved (and a new issue opened for remainder).

  7. jgarzik closed this on Dec 31, 2014

  8. suprnurd referenced this in commit 026ad8421a on Dec 5, 2017
  9. MarcoFalke locked this on Sep 8, 2021

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-13 15:16 UTC

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