[wallet, rpc tests] Fix settxfee, paytxfee - #7103
Merged
Merged
Conversation
Member
There was a problem hiding this comment.
Does removing the extra zeroes here make any difference?
Member
Author
There was a problem hiding this comment.
>>> Decimal("0.100") == Decimal(".1")
True
But the diff is larger. So removed this.
Contributor
There was a problem hiding this comment.
hmm.. is forming a byte arrayreally necessary? Would len(hex_string)/2 not be sufficient?
Member
There was a problem hiding this comment.
I considered that nit, but right now it checks it is a valid hex string, which is kind of useful for a test
Contributor
|
Tested ACK. Works (tx size 373 bytes, txfeerate is 0.01, fee = Jonass-MacBook-Pro:_bitcoin jonasschnelli$ ./src/bitcoin-cli --regtest getbalance
47.98861600
Jonass-MacBook-Pro:_bitcoin jonasschnelli$ ./src/bitcoin-cli --regtest settxfee 0.01
true
Jonass-MacBook-Pro:_bitcoin jonasschnelli$ ./src/bitcoin-cli --regtest getnewaddress
n1YGgjMuRDCEL9PDoMXKeEMzE4Z5gYNHKC
Jonass-MacBook-Pro:_bitcoin jonasschnelli$ ./src/bitcoin-cli --regtest sendtoaddress n1YGgjMuRDCEL9PDoMXKeEMzE4Z5gYNHKC 1.0
ccfb9f516f7935fe53d8c8dfbda2ba9f573a516da465124d4a3f02e9afb1c009
Jonass-MacBook-Pro:_bitcoin jonasschnelli$ ./src/bitcoin-cli --regtest gettransaction ccfb9f516f7935fe53d8c8dfbda2ba9f573a516da465124d4a3f02e9afb1c009
{
"amount": 0.00000000,
"fee": -0.00373000,
"confirmations": 0,
"txid": "ccfb9f516f7935fe53d8c8dfbda2ba9f573a516da465124d4a3f02e9afb1c009",
"walletconflicts": [
],
"time": 1448546094,
"timereceived": 1448546094,
"details": [
{
"account": "",
"address": "n1YGgjMuRDCEL9PDoMXKeEMzE4Z5gYNHKC",
"category": "send",
"amount": -1.00000000,
"label": "",
"vout": 1,
"fee": -0.00373000
},
{
"account": "",
"address": "n1YGgjMuRDCEL9PDoMXKeEMzE4Z5gYNHKC",
"category": "receive",
"amount": 1.00000000,
"label": "",
"vout": 1
}
],
"hex": "0100000002194adfb873b92507d4004b34910ea2e48f673be6c2d46b2408123e59b581f043000000006a47304402203bc41e34daa2ec5f795c38ef31c6d6fe926682609ebaca41ad50867b810d49b902203028f9334df4415da1f0c12ce76211c70583e853e3bb3158508b973b1b659ab4012102d9ce185100c65ba09aaf0d634fb86632ad73a54ff510f833e00348f4bb9edc47feffffff194adfb873b92507d4004b34910ea2e48f673be6c2d46b2408123e59b581f043010000006b483045022100e7fd9fc3a9e0d3ca6e8724e3daf330a1afe5de801e58c5f2193aaed25723d24d0220503460a151301d304f00b6d16364c9cb128e0005eda24950d6436a5b23a86baf01210339167b46e7774585f439d4780919e2dee5af9023cdef4778e245aa40c7650a04feffffff02e09def05000000001976a914d8d20ef3bdd8a263461b5463673cb901716bd88288ac00e1f505000000001976a914dba2489ddc1bfc465632141b8c5e1f3e1fd4a16888ac5b000000"
}Tested also together with the UI (known bug/interference still behaves likes expected). |
Member
|
utACK |
1 similar comment
Member
|
utACK |
Member
|
@gmaxwell can you take a look here too |
This allows for much finer control of the transaction fees per kilobyte as it prevent small transactions using a fee that is more appropriate for one that is of a kilobyte. This also allows controlling the fee per kilobyte over rpc such that: bitcoin-cli settxfee `bitcoin-cli estimatefee 2` would make sense, while currently it grossly fails often by a factor of x3
Member
Author
|
Trivial rebase. (Previous head: fa895cb) |
This was referenced Aug 21, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This comes without the GUI changes, so it should be easier to review and backport. GUI: #7096