John Newbery
6d07c62322
Return correct error codes in bumpfee().
...
The bumpfee() RPC was returning misleading or incorrect error codes
(for example RPC_INVALID_ADDRESS_OR_KEY when the transaction was not
BIP125 replacable). This commit fixes those error codes:
- RPC_INVALID_ADDRESS_OR_KEY if an invalid address was provided:
- Invalid change address given
- RPC_INVALID_PARAMETER if a single (non-address/key) parameter is incorrect
- confTarget and totalFee options should not both be set.
- Invalid confTarget
- Insufficient totalFee (cannot be less than required fee)
- RPC_WALLET_ERROR for any other error
- Transaction has descendants in the wallet
- Transaction has descendants in the mempool
- Transaction has been mined, or is conflicted with a mined transaction
- Transaction is not BIP 125 replaceable
- Transaction has already been bumped
- Transaction contains inputs that don't belong to the wallet
- Transaction has multiple change outputs
- Transaction does not have a change output
- Fee is higher than maxTxFee
- New fee rate is less than the minimum fee rate
- Change output is too small.
This commit also updates the test cases to explicitly test the error code.
8 years ago
Wladimir J. van der Laan
47510ad3dd
Merge #9548 : Remove min reasonable fee
...
ad82cb0
Remove unnecessary min fee argument in CTxMemPool constructor (Alex Morcos)
2a7b56c
CBlockPolicyEstimator now uses hard coded minimum bucket feerate (Alex Morcos)
ac9d3d2
Change fee estimation bucket limit variable names (Alex Morcos)
Tree-SHA512: 6e3bc7df3497ed60c7620845d222063e33a0238020f5c3316e61e0eff758078588ea8dd51196ceb59aa561ba106f8cdae62cebe521adb3247108bb49f15252d6
8 years ago
Wladimir J. van der Laan
30ff3a2fc9
Merge #9602 : Remove coin age priority and free transactions - implementation
...
b421e6d
Update example bitcoin.conf (Alex Morcos)
7d4e950
Allow setting minrelaytxfee to 0 (Alex Morcos)
359e8a0
[cleanup] Remove coin age priority completely. (Alex Morcos)
f9b9371
[rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos)
49be7e1
[rpc] Remove priority information from mempool RPC calls (Alex Morcos)
0315888
[test] Remove priority from tests (Alex Morcos)
f838005
No longer allow "free" transactions (Alex Morcos)
ad727f4
[rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos)
fe282ac
[cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos)
400b151
[debug] Change -printpriority option (Alex Morcos)
272b25a
[mining] Remove -blockprioritysize. (Alex Morcos)
12839cd
[rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos)
ddf58c7
wallet: Remove sendfree (MarcoFalke)
Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782
8 years ago
Wladimir J. van der Laan
3178b2c740
Merge #9369 : Factor out CWallet::nTimeSmart computation into a method.
...
630fc54
Clean up braces in CWallet::ComputeTimeSmart (Russell Yanofsky)
6c996c2
Add documentation describing CWallet::nTimeSmart. (Russell Yanofsky)
1f98abe
Factor out CWallet::nTimeSmart computation into a method. (Russell Yanofsky)
c6b82d1
Add tests for CWalletTx::nTimeSmart (Russell Yanofsky)
Tree-SHA512: 457a30251e572cf20dac0198af1a94128d269b1e0ce6605a213d56fc14d85c84a0a494e3dcbb18c201c4f39e6f7b000bd9cb6f283930d8452e4bb93ba406f8d4
8 years ago
Wladimir J. van der Laan
6015df5b85
Merge #9912 : Optimize GetWitnessHash() for non-segwit transactions
...
02c57b5
Optimize GetWitnessHash() for non-segwit transactions (Suhas Daftuar)
Tree-SHA512: 405d07c11930f3432ae25b11232466a30ba2339be98e0fb5149934d792e014f504fedbe62b9c8e5febbbdad459bd1573ea896e527b9aa591926bbc774b895e6a
8 years ago
Wladimir J. van der Laan
779f2f9747
Merge #9605 : Use CScheduler for wallet flushing, remove ThreadFlushWalletDB
...
0235be1
Rename FlushWalletDB -> CompactWalletDB, add function description (Matt Corallo)
735d9b5
Use CScheduler for wallet flushing, remove ThreadFlushWalletDB (Matt Corallo)
73296f5
CScheduler boost->std::function, use millisecs for times, not secs (Matt Corallo)
Tree-SHA512: c04f97beab65706c444c126be229d02887df9b0972d8fb15ca1f779ef0e628cf7ecef2bf533c650d9b44645b63e01de22f17266a05907e778938d64cc6e19de6
8 years ago
Wladimir J. van der Laan
309bf16257
devtools: Fix a syntax error typo
...
Fix a typo introduced in #9880 causing the script to not even parse.
8 years ago
Wladimir J. van der Laan
00c13ea637
Merge #9932 : Fix verify-commits on travis and always check top commit's tree
...
b3ec305
Fix bashisms in verify-commits and always check top commit's tree (Matt Corallo)
f20e664
Check gpg version before setting --weak-digest (Matt Corallo)
Tree-SHA512: f87247008ae6a265e3fd371f00aec0e84f1feb713bf5859eab139a88a4e205e1f26de7b510bcc2c3ab538d5443978a48ec920d25b52b9601e625d198fa2d725f
8 years ago
MarcoFalke
19be26afe3
Merge #9555 : [test] Avoid reading a potentially uninitialized variable in tx_invalid-test (transaction_tests.cpp)
...
8455e36
[test] Avoid reading a potentially uninitialized variable in tx_invalid-test (practicalswift)
Tree-SHA512: 1064cdd5c9e4612a05397a5880535d93dbb18dec4897b4bbda9e6ad78d30f4c72303e4d23159398f1b33545ff5819e739e374d7cde757e402b26c355268a2319
8 years ago
Matt Corallo
0235be1e7a
Rename FlushWalletDB -> CompactWalletDB, add function description
8 years ago
Matt Corallo
735d9b5362
Use CScheduler for wallet flushing, remove ThreadFlushWalletDB
8 years ago
Matt Corallo
73296f54d6
CScheduler boost->std::function, use millisecs for times, not secs
8 years ago
Matt Corallo
b3ec305f8e
Fix bashisms in verify-commits and always check top commit's tree
8 years ago
Matt Corallo
f20e664f40
Check gpg version before setting --weak-digest
8 years ago
Wladimir J. van der Laan
72fb5158b1
Merge #9906 : Disallow copy constructor CReserveKeys
...
188f89c
Disallow copy of CReserveKeys (Gregory Sanders)
Tree-SHA512: e55ce10bf7f2dc91de9797e60ab7767fb51f25255995d62ddf358c52b7aaa23c26fbfb522e1610ff950b86804ddbc38dc0d7708bfab2c4d33ad99a275d8c77db
8 years ago
Wladimir J. van der Laan
d5ce14e223
Merge #9929 : tests: Delete unused function _rpchost_to_args
...
99fecf8
tests: Delete unused function _rpchost_to_args (Wladimir J. van der Laan)
Tree-SHA512: 40911d048d3fd7b3ce83e9b3caf2a409d55b47cbe08ea4450a16ca72264300bb12d5ef7dbcf335885975119b5977f949e6879546840064138fb506e24494d849
8 years ago
Wladimir J. van der Laan
c78adbf450
Merge #9843 : Fix segwit getblocktemplate test
...
b23dcd2
Fix segwit getblocktemplate test. (John Newbery)
Tree-SHA512: db87a99432397bd9aa3b66580a92a69467aa4c8a9e3a191629429f80137a59f6ecb13d129d880ebe404d903e13b153aca3ca99e3b1a94e171a4b8a50fb690f3f
8 years ago
Wladimir J. van der Laan
4df8213b98
Merge #9880 : Verify Tree-SHA512s in merge commits, enforce sigs are not SHA1
...
bbd7579
Fix regsig checking for subkey sigs in verify-commits (Matt Corallo)
d025bc7
Allow any subkey in verify-commits (Matt Corallo)
eddc77a
Add comment re: why SHA1 is disabled (Peter Todd)
d9c450f
Verify Tree-SHA512s in merge commits, enforce sigs are not SHA1 (Matt Corallo)
be908a6
Fail merge if there are any symlinks (Matt Corallo)
Tree-SHA512: bb66c59cc1c6b1c86d7d8be7adb0769c6598c0e28ad927409941f30af87d390521e82fc13700ee22e92db1bd571db3e19a152ec7b2c0349c6e06f5de62c0b65f
8 years ago
Wladimir J. van der Laan
99fecf80dc
tests: Delete unused function _rpchost_to_args
...
This function has been unused ever since the RPC tests no longer use
`bitcoin-cli`.
8 years ago
Gregory Sanders
188f89c3bb
Disallow copy of CReserveKeys
8 years ago
Wladimir J. van der Laan
8a3b07529d
Merge #8574 : [Wallet] refactor CWallet/CWalletDB/CDB
...
7184e25
[Wallet] refactor CWallet/CWalletDB/CDB (Jonas Schnelli)
Tree-SHA512: a1993dcfc3505459613e8be3f6560ef32466fd7c649bff358f12af118e633aadd648a090f4af60743a827c9cb624e4ec63eb0202326da4779fc18249bb77da1e
8 years ago
Jonas Schnelli
7184e25c80
[Wallet] refactor CWallet/CWalletDB/CDB
...
Try to hide CDB/bitdb behinde CWalletDB.
Prepare for full wallet database abstraction.
8 years ago
Wladimir J. van der Laan
fa625b078b
Merge #9333 : Document CWalletTx::mapValue entries and remove erase of nonexistent "version" entry.
...
87ed396
[trivial] Add comment documenting bumpfee mapValues (Russell Yanofsky)
a1fe944
Remove reference to nonexistent "version" wallet transaction mapvalue field (Russell Yanofsky)
654e044
[trivial] Add comment documenting CWalletTx::mapValue (Russell Yanofsky)
Tree-SHA512: 1fd1860e345c59b13634db2007fff4ba30aaf1f177fdd765f47bf9257fac117cdcd5d491424416da304c08e85effbb27f3424f072f7c9587ef39cb98531b932a
8 years ago
Wladimir J. van der Laan
d32581cc29
Merge #9547 : bench: Assert that division by zero is unreachable
...
db07f91
Assert that what might look like a possible division by zero is actually unreachable (practicalswift)
Tree-SHA512: f1652eb37196a5b72f356503a1fbb44fb98aa8a94954ad1765f86d81ebf41a2337d4eb58c4f19937fda3752f5d2d642756e44afdbd438015b87ac20801246bff
8 years ago
Wladimir J. van der Laan
9d5fcbfb08
Merge #9739 : Fix BIP68 activation test
...
f5aba8a
Move tx version 2 standardness check to after bip68 activation (John Newbery)
99c0e81
Fix BIP68 activation test (John Newbery)
Tree-SHA512: 3633d5359705b33a22cd3d8ea28f41abd93ccc6fe9943c8004f6149add991771df9ea12b4e14192e39e14b414bb5ecc7218e516cfeec97e4c5df29778ac57060
8 years ago
Wladimir J. van der Laan
48c3429c50
Merge #9832 : [qa] assert_start_raises_init_error
...
025dec0
[qa] assert_start_raises_init_error (NicolasDorier)
Tree-SHA512: 0fe3ecbd47625b181aed92f15445ac26993e1a8b9843bbc1088c4adcea774e503b870912a18e13dca3f255c22a9964c1c0ca92c758907538143f316c5272ea4a
8 years ago
Wladimir J. van der Laan
5a6af31722
Merge #9908 : Define 7200 second timestamp window constant
...
e57a1fd
Define 7200 second timestamp window constant (Russell Yanofsky)
Tree-SHA512: 449d20e4fd23905cd96be36f717c55a0a2360aba1002aaf55a3699cce4a41f6e94acc2fbe511a93c5cbe8f8e68386995a76cad67620ebb66ba9283e6080ab567
8 years ago
Wladimir J. van der Laan
56ab672b59
Merge #9576 : [wallet] Remove redundant initialization
...
343ba8f
[wallet] Remove redundant initialization (practicalswift)
Tree-SHA512: 54b94d7703b1735cb1ae0bd7eba61ca9d2f18e20b70e46c94aa3b0653495dce4fdea00cf953ec08215b96b5792eabb8b38c3f9b3cd36e52b82fcb2f1fd8a3540
8 years ago
NicolasDorier
025dec0e5b
[qa] assert_start_raises_init_error
8 years ago
Matt Corallo
bbd757940b
Fix regsig checking for subkey sigs in verify-commits
8 years ago
Wladimir J. van der Laan
01b7cda916
Merge #9905 : [contrib] gh-merge: Move second sha512 check to the end
...
fa7da3f
[contrib] gh-merge: Move second sha512 check to before signing (MarcoFalke)
Tree-SHA512: b3d96f928a013f6fdc416035b8ef5cd7c750ab0922156e1fd712cd27ec75847497109f43a96559b945ba11ad43b5644ed9c1de695590ff608658628fb57b1571
8 years ago
Matt Corallo
d025bc7964
Allow any subkey in verify-commits
8 years ago
Peter Todd
eddc77a1b1
Add comment re: why SHA1 is disabled
8 years ago
Matt Corallo
d9c450ffb2
Verify Tree-SHA512s in merge commits, enforce sigs are not SHA1
8 years ago
Alex Morcos
b421e6ddcf
Update example bitcoin.conf
8 years ago
Alex Morcos
7d4e9509ad
Allow setting minrelaytxfee to 0
...
Setting minrelaytxfee to 0 will allow all transactions regardless of fee to enter your mempool until it reaches its size limit. However now that mempool limiting is governed by a separate incrementalrelay fee, it is an unnecessary restriction to prevent a minrelaytxfee of 0.
8 years ago
Alex Morcos
359e8a03d1
[cleanup] Remove coin age priority completely.
...
Remove GetPriority and ComputePriority. Remove internal machinery for tracking priority in CTxMemPoolEntry.
8 years ago
Alex Morcos
f9b9371c60
[rpc] Remove priorityDelta from prioritisetransaction
...
This a breaking API change to the prioritisetransaction RPC call which previously required exactly three arguments and now requires exactly two (hash and feeDelta). The function prioritiseTransaction is also updated.
8 years ago
Alex Morcos
49be7e1bef
[rpc] Remove priority information from mempool RPC calls
...
"startingpriority" and "currentpriority" are no longer returned in the JSON information about a mempool entry. This affects getmempoolancestors, getmempooldescendants, getmempooolentry, and getrawmempool.
8 years ago
Alex Morcos
0315888d0d
[test] Remove priority from tests
...
Remove all coin age priority functionality from unit tests and RPC tests.
8 years ago
Alex Morcos
f838005444
No longer allow "free" transactions
...
Remove -limitfreerelay and always enforce minRelayTxFee in the mempool (except from disconnected blocks)
Remove -relaypriority, the option was only used for the ability to allow free transactions to be relayed regardless of their priority. Both notions no longer apply.
8 years ago
Russell Yanofsky
e57a1fd899
Define 7200 second timestamp window constant
8 years ago
Suhas Daftuar
02c57b521a
Optimize GetWitnessHash() for non-segwit transactions
8 years ago
Russell Yanofsky
630fc549e2
Clean up braces in CWallet::ComputeTimeSmart
8 years ago
Wladimir J. van der Laan
53c300fb52
Merge #9910 : Docs: correct and elaborate -rpcbind doc
...
e5b449c
Docs: correct and elaborate -rpcbind doc (Ian Kelling)
Tree-SHA512: e1cdaa32f7248f304d463e3f37d7d5da23ee0e506bd453420b87f4cc9c704cc30214e41c9266294890d65f2ee270f9355f38b542e8c01452637bdbba8273c755
8 years ago
Russell Yanofsky
6c996c2df7
Add documentation describing CWallet::nTimeSmart.
...
Most of the text comes from the 2012 Luke Dashjr <luke-jr+git@utopios.org>
c3f95ef
commit message.
8 years ago
Russell Yanofsky
1f98abe47b
Factor out CWallet::nTimeSmart computation into a method.
...
No change in behavior, this change just pulls some code out of
CWallet::AddToWallet that was making it very long into a separate method.
8 years ago
Russell Yanofsky
c6b82d1db5
Add tests for CWalletTx::nTimeSmart
8 years ago
Wladimir J. van der Laan
90cb2a218e
Merge #9774 : Enable host lookups for -proxy and -onion parameters
...
f36bdf0
Enable host lookups for -proxy and -onion parameters (Johnathan Corgan)
Tree-SHA512: 40f5ef3954721333e58d34653874d9f6ac5426c817762d132838f3b6f968ca5ca05aa56d02fd742cb5a8dc040f1a28dad6d54f667342eceba62fb2af18b58fc0
8 years ago
Wladimir J. van der Laan
67c5cc1917
Merge #9828 : Avoid -Wshadow warnings in wallet_tests
...
09fe346
Avoid -Wshadow warnings in wallet_tests (Russell Yanofsky)
Tree-SHA512: 03a026787438efc9eba94299c2dd7de07a71ec7363b058b4f086d5ff0be844660fff2ef4f40e43d91313ea53de25f3de3c677b080b564d37f0693057498d3233
8 years ago