Relay and accept transactions that personally benefit the user #1128

pull luke-jr wants to merge 3 commits into bitcoin:master from luke-jr:my_free_txn changing 1 files +15 −3
  1. luke-jr commented at 2:49 PM on April 20, 2012: member

    Not sure why I didn't submit this a long time ago, but it seems like obvious behaviour...

  2. sipa commented at 2:56 PM on April 20, 2012: member

    I'm not sure it is a good idea to accept nonstandard (or otherwise non-policy compliant, whatever the policy is) transactions into your memory pool if you're not mining yourself.

  3. luke-jr commented at 3:07 PM on April 20, 2012: member

    Refusal to accept your own transactions breaks the rest of the wallet code right now, in my experience. At least this way, you can solicit a miner to accept it.

  4. sipa commented at 3:09 PM on April 20, 2012: member

    Of course, but the wallet shouldn't create such transactions. If it does, that's a bug.

  5. luke-jr commented at 3:12 PM on April 20, 2012: member

    Or a new feature in development.

    So either it's a no-op in a non-buggy vanilla client, or it prevents bug compounding and makes testing new features easier.

  6. jgarzik commented at 3:47 PM on April 20, 2012: contributor

    Or (Satoshi would certainly say "no" here...) just add a cli switch that disables the isStandard test at runtime (i.e. accepts all valid transactions as standard), instead of hacking it half-way like this.

  7. luke-jr commented at 3:53 PM on April 20, 2012: member

    That'd be #559 ;)

    I don't think bypassing the non-standard checks for ones own transactions is a half-way-hack.

  8. gavinandresen commented at 11:29 PM on April 21, 2012: contributor

    Accepting transactions you don't understand is a really bad idea, ESPECIALLY if they are to you. Getting your client to accept a non-standard transaction that the rest of the network will eventually reject is a good first step to a successful double-spend.

    No philosophical objection to the other commit, although I hate making the code more complicated for a "never actually a problem" case.

  9. luke-jr commented at 11:54 PM on April 21, 2012: member

    This doesn't accept non-standard transactions to you, only from you... or at least that's what I had in mind when I wrote it - does IsMine return true for ones you're receiving too?

  10. luke-jr commented at 1:48 PM on April 22, 2012: member

    Yeah, looks like I confused IsMine with IsFromMe. Closing until I've fixed this (let me know if it's wanted for 0.6.1 and I'll prioritize it)

  11. luke-jr closed this on Apr 22, 2012

  12. Accept any transaction (fee-free or even non-standard) from myself 8adf1c2e17
  13. When mining, weigh transactions to or from myself the same as if they had 1 BTC more input at 1 confirm 1870506c2b
  14. Count credits to me against fee minimums 9a510cfa9f
  15. luke-jr reopened this on May 18, 2012

  16. luke-jr commented at 8:49 PM on May 18, 2012: member

    Rewrote, should fix the problems.

  17. jgarzik commented at 3:40 PM on August 1, 2012: contributor

    Sounds like consensus is fairly strong against accepting non-standard TX's, from yourself or not.

  18. jgarzik closed this on Aug 1, 2012

  19. suprnurd referenced this in commit f2d2b25130 on Dec 5, 2017
  20. lateminer referenced this in commit 74f182dc58 on Jan 22, 2019
  21. lateminer referenced this in commit d6573e70c7 on Dec 25, 2019
  22. lateminer referenced this in commit e0c49356ae on Dec 25, 2019
  23. lateminer referenced this in commit fc4ffcf4af on Dec 25, 2019
  24. DrahtBot 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-14 15:16 UTC

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