Not sure why I didn't submit this a long time ago, but it seems like obvious behaviour...
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-
luke-jr commented at 2:49 PM on April 20, 2012: member
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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?
-
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)
- luke-jr closed this on Apr 22, 2012
-
Accept any transaction (fee-free or even non-standard) from myself 8adf1c2e17
-
When mining, weigh transactions to or from myself the same as if they had 1 BTC more input at 1 confirm 1870506c2b
-
Count credits to me against fee minimums 9a510cfa9f
- luke-jr reopened this on May 18, 2012
-
luke-jr commented at 8:49 PM on May 18, 2012: member
Rewrote, should fix the problems.
-
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.
- jgarzik closed this on Aug 1, 2012
- suprnurd referenced this in commit f2d2b25130 on Dec 5, 2017
- lateminer referenced this in commit 74f182dc58 on Jan 22, 2019
- lateminer referenced this in commit d6573e70c7 on Dec 25, 2019
- lateminer referenced this in commit e0c49356ae on Dec 25, 2019
- lateminer referenced this in commit fc4ffcf4af on Dec 25, 2019
- DrahtBot locked this on Sep 8, 2021