Bitcoin Forum
November 05, 2024, 06:46:29 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need Patch: Reject TX if calculated Fee is too high!!  (Read 2044 times)
niceWoman25 (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
July 02, 2014, 08:36:04 PM
 #1

I would like to tweak or write a small patch for linux bitcoind. Can you please help me?

I do send transactions by RPC like sendtoaddress from my web application to the bitcoind daemon. The problem is, I cant really control the fees.

On some occasions, the fee gets too high because of dust. Which I do not want. And now I would like to hard code a limit into bitocoind (bitcoincore) to reject a (per RPC transmitted) transaction IF the internally calculated fee is above a limit like: 0.01 BTC.

And the RPC command should then just throw an error like: err, calculated fee is higher than hardcoded limit of 0.01 BTC.  

It mus be easy to code that. I assume there are only a couple of c++ lines necessary.

Could you please write it for me ?

gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4270
Merit: 8805



View Profile WWW
July 02, 2014, 10:32:17 PM
 #2

On some occasions, the fee gets too high because of dust. Which I do not want. And now I would like to hard code a limit into bitocoind (bitcoincore) to reject a (per RPC transmitted) transaction IF the internally calculated fee is above a limit like: 0.01 BTC.
In the current codebase any transaction will be rejected if the transaction is >100k. 100kB times the base fee for non-free transactions is 0.001, so unless you've increased your fees there is already a hard limit ten times lower than you asked for.
niceWoman25 (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
July 03, 2014, 05:24:10 AM
 #3

thanks, I will look that up in the source code.

The reason why I am asking is, that I am also using altcoins. Like litecoin. And the fees are different among the forks.

But if I could implement a code snippet into some of these forks to implement a hardlimit on fee it would be interesting.
domob
Legendary
*
Offline Offline

Activity: 1135
Merit: 1170


View Profile WWW
July 03, 2014, 06:24:18 AM
 #4

Seems like a potentially useful feature, although I agree with gmaxwell that it may not be so useful (except for enforcing lower limits or for other coins with changed settings) for Bitcoin as-is.  As I'd be interested to get into development for Bitcoin Core (so far I'm working on Namecoin), I can write such a patch - but I think we should discuss first what the core dev's think about it unless the change would be a waste of time and never merged. Wink

Use your Namecoin identity as OpenID: https://nameid.org/
Donations: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS | GPG 0xA7330737
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1026



View Profile
July 05, 2014, 11:32:31 AM
 #5

Just use the raw transaction API if you want fine control over fees.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!