Bitcoin Forum
June 18, 2018, 10:40:05 AM *
News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Change paytxfee without restarting?  (Read 3116 times)
kseistrup
Hero Member
*****
Offline Offline

Activity: 565
Merit: 500


Unselfish actions pay back better


View Profile WWW
March 10, 2011, 07:52:21 PM
 #1

Hi,

I'd like to change bitcoind's ‘paytxfee’ value on the fly — i.e., without restarting bitcoind — but I can't seem to find a suitable jsonrpc command…

Anyone?

Cheers,

Klaus Alexander Seistrup
http://about.me/kseistrup
1529318405
Hero Member
*
Offline Offline

Posts: 1529318405

View Profile Personal Message (Offline)

Ignore
1529318405
Reply with quote  #2

1529318405
Report to moderator
The World's Betting Exchange

Bet with play money. Win real Bitcoin. 5BTC Prize Fund for World Cup 2018.

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1529318405
Hero Member
*
Offline Offline

Posts: 1529318405

View Profile Personal Message (Offline)

Ignore
1529318405
Reply with quote  #2

1529318405
Report to moderator
1529318405
Hero Member
*
Offline Offline

Posts: 1529318405

View Profile Personal Message (Offline)

Ignore
1529318405
Reply with quote  #2

1529318405
Report to moderator
jgarzik
Legendary
*
Offline Offline

Activity: 1540
Merit: 1001


View Profile
March 10, 2011, 08:18:20 PM
 #2

I agree it should be change-able at runtime.  Long-running nodes will want to adapt to changing network conditions, without needing to restart bitcoind.

Here's a patch:  http://yyz.us/bitcoin/patch.bitcoin-settxfee

Any volunteers to test ?


Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
kseistrup
Hero Member
*****
Offline Offline

Activity: 565
Merit: 500


Unselfish actions pay back better


View Profile WWW
March 10, 2011, 08:26:27 PM
 #3

I agree it should be change-able at runtime.  Long-running nodes will want to adapt to changing network conditions, without needing to restart bitcoind.

Exactly!

Quote
Here's a patch:  http://yyz.us/bitcoin/patch.bitcoin-settxfee

Any volunteers to test ?

I'll bite!  Smiley

Cheers,

Klaus Alexander Seistrup
http://about.me/kseistrup
kseistrup
Hero Member
*****
Offline Offline

Activity: 565
Merit: 500


Unselfish actions pay back better


View Profile WWW
March 10, 2011, 08:33:31 PM
 #4

So far, so good.  I ran “bitcoind settxfee 0.01” from the commandline, and now “btc getinfo” shows “"paytxfee" : 0.01000000”.

Thanks for your help!!

Cheers,

Klaus Alexander Seistrup
http://about.me/kseistrup
kseistrup
Hero Member
*****
Offline Offline

Activity: 565
Merit: 500


Unselfish actions pay back better


View Profile WWW
March 10, 2011, 08:40:52 PM
 #5

Hm, there's something I don't understand.  I set txfee to BTC 0.01, then sent jgarzik BTC 0.99, thinking that this would add up to BTC 1.00.  However:

Code:
$ btc getinfo | grep txfee
    "paytxfee" : 0.01000000,
$ btc sendtoaddress 17NdbrSGoUotzeGCcMMCqnFkEvLymoou9j 0.99 "settxfee patch" jgarzik
2a59d5910721dd5729d19737f300bf9b953fc55d32e6cd16dabb8bd5885280be
$ btc gettransaction 2a59d5910721dd5729d19737f300bf9b953fc55d32e6cd16dabb8bd5885280be
{
    "amount" : -0.99000000,
    "fee" : -0.02000000,
    "confirmations" : 0,
    "txid" : "2a59d5910721dd5729d19737f300bf9b953fc55d32e6cd16dabb8bd5885280be",
    "time" : 1299789332,
    "comment" : "settxfee patch",
    "to" : "jgarzik",
    "details" : [
        {
            "account" : "",
            "address" : "17NdbrSGoUotzeGCcMMCqnFkEvLymoou9j",
            "category" : "send",
            "amount" : -0.99000000,
            "fee" : -0.02000000
        }
    ]
}
$

How come the fee ended up being BTC 0.02 instead of 0.01?

Cheers,

Klaus Alexander Seistrup
http://about.me/kseistrup
jgarzik
Legendary
*
Offline Offline

Activity: 1540
Merit: 1001


View Profile
March 10, 2011, 08:52:35 PM
 #6

EDIT: nevermind Smiley

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
jgarzik
Legendary
*
Offline Offline

Activity: 1540
Merit: 1001


View Profile
March 10, 2011, 08:55:42 PM
 #7

Blockexplorer agrees with your gettransaction output, too:
http://blockexplorer.com/tx/2a59d5910721dd5729d19737f300bf9b953fc55d32e6cd16dabb8bd5885280be

Sounds like a rounding issue somewhere...

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
kseistrup
Hero Member
*****
Offline Offline

Activity: 565
Merit: 500


Unselfish actions pay back better


View Profile WWW
March 10, 2011, 09:07:18 PM
 #8

Blockexplorer agrees with your gettransaction output, too:
http://blockexplorer.com/tx/2a59d5910721dd5729d19737f300bf9b953fc55d32e6cd16dabb8bd5885280be

Sounds like a rounding issue somewhere...

Yeah, it must be.  I sent BTC 1.00 to someone else, and that transaction had a fee of BTC 0.01.

Cheers,

Klaus Alexander Seistrup
http://about.me/kseistrup
jgarzik
Legendary
*
Offline Offline

Activity: 1540
Merit: 1001


View Profile
March 10, 2011, 09:29:23 PM
 #9

Patch updated, to remove lower bound on TX fee.

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!