Commit Graph

10473 Commits

Author SHA1 Message Date
Jonas Schnelli 788d8e6a6f
fundrawtransaction tests 2017-03-02 13:23:03 -08:00
Matt Corallo 3d8013a01b
Add fundrawtransaction RPC method 2017-03-02 13:23:03 -08:00
Matt Corallo aa30f65502
Add FundTransaction method to wallet
Some code stolen from Jonas Schnelli <jonas.schnelli@include7.ch>
2017-03-02 13:23:03 -08:00
Matt Corallo b6616548ce
Small tweaks to CCoinControl for fundrawtransaction 2017-03-02 13:23:03 -08:00
Pieter Wuille 18e804a925
Add DummySignatureCreator which just creates zeroed sigs 2017-03-02 13:23:03 -08:00
dexX7 9c7167d1bc
Return all available information via validateaddress
`"validateaddress"` omits some information, even in cases where is it available.

The primary motivation is to be able to retrieve redeemScripts, after using `"addmultisigaddress"`, when not all keys are available in the keystore, but the redeemScript actually is.

The output of `"validateaddress"` with this commit:

Keys not available:
```js
validateaddress "n4KWZKx349gdMQGgTnZ8W6WfgSwybkGSK3"
{
  "isvalid": true,
  "address": "n4KWZKx349gdMQGgTnZ8W6WfgSwybkGSK3",
  "scriptPubKey": "76a914fa20d564550b105787f7ce3a9ad7fd9a45cd407088ac",
  "ismine": false,
  "iswatchonly": false,
  "isscript": false
}
```
```js
validateaddress "2N2g2H7gjA8a11g1yKBgh5VTqndyvbnWpBK"
{
  "isvalid": true,
  "address": "2N2g2H7gjA8a11g1yKBgh5VTqndyvbnWpBK",
  "scriptPubKey": "a9146769c19a16c9400b908756e19a4d2afb9e9760e187",
  "ismine": false,
  "iswatchonly": false,
  "isscript": true
}
```

After adding the redeemScript:
```js
addmultisigaddress 2 '["02537357B156A33306A7A014A3748631C59DF405B56F11BA4AA4A3CE81501AF095","02F1FB200390E7864EF4450C07B15988179A57C3CF3A878F668E1070CB615749FE"]'
2N2g2H7gjA8a11g1yKBgh5VTqndyvbnWpBK

validateaddress "2N2g2H7gjA8a11g1yKBgh5VTqndyvbnWpBK"
{
  "isvalid": true,
  "address": "2N2g2H7gjA8a11g1yKBgh5VTqndyvbnWpBK",
  "scriptPubKey": "a9146769c19a16c9400b908756e19a4d2afb9e9760e187",
  "ismine": false,
  "iswatchonly": false,
  "isscript": true,
  "script": "multisig",
  "hex": "522102537357b156a33306a7a014a3748631c59df405b56f11ba4aa4a3ce81501af0952102f1fb200390e7864ef4450c07b15988179a57c3cf3a878f668e1070cb615749fe52ae",
  "addresses": [
    "n4KWZKx349gdMQGgTnZ8W6WfgSwybkGSK3",
    "mmSKNtbYYHRrhTLKiok5TuYrGEs4Y2A4k6"
  ],
  "sigsrequired": 2,
  "account": ""
}
```

All keys available:
```js
validateaddress "n4KWZKx349gdMQGgTnZ8W6WfgSwybkGSK3"
{
  "isvalid": true,
  "address": "n4KWZKx349gdMQGgTnZ8W6WfgSwybkGSK3",
  "scriptPubKey": "76a914fa20d564550b105787f7ce3a9ad7fd9a45cd407088ac",
  "ismine": true,
  "iswatchonly": false,
  "isscript": false,
  "pubkey": "02537357b156a33306a7a014a3748631c59df405b56f11ba4aa4a3ce81501af095",
  "iscompressed": true,
  "account": ""
}
```
```js
validateaddress "2N2g2H7gjA8a11g1yKBgh5VTqndyvbnWpBK"
{
  "isvalid": true,
  "address": "2N2g2H7gjA8a11g1yKBgh5VTqndyvbnWpBK",
  "scriptPubKey": "a9146769c19a16c9400b908756e19a4d2afb9e9760e187",
  "ismine": true,
  "iswatchonly": false,
  "isscript": true,
  "script": "multisig",
  "hex": "522102537357b156a33306a7a014a3748631c59df405b56f11ba4aa4a3ce81501af0952102f1fb200390e7864ef4450c07b15988179a57c3cf3a878f668e1070cb615749fe52ae",
  "addresses": [
    "n4KWZKx349gdMQGgTnZ8W6WfgSwybkGSK3",
    "mmSKNtbYYHRrhTLKiok5TuYrGEs4Y2A4k6"
  ],
  "sigsrequired": 2,
  "account": ""
}
```
2017-03-02 13:23:03 -08:00
Wladimir J. van der Laan a0455eca11
rpc: make `gettxoutsettinfo` run lock-free
For leveldb "An iterator operates on a snapshot of the database taken
when the iterator is created". This means that it is unnecessary to
lock out other threads while computing statistics, and neither to hold
cs_main for the whole time. Let the thread run free.
2017-03-02 13:23:03 -08:00
Jonas Schnelli cbf3ab51f9
fix lock issue for QT node diconnect and RPC disconnectnode
Zcash: only RPC disconnectnode
2017-03-02 13:23:03 -08:00
Jonas Schnelli fa80be8ff5
setban: add IPv6 tests 2017-03-02 13:23:03 -08:00
Jonas Schnelli 0382246bb1
fix missing lock in CNode::ClearBanned() 2017-03-02 13:23:03 -08:00
Jonas Schnelli 2ab237a088
add RPC tests for setban & disconnectnode 2017-03-02 13:23:03 -08:00
Jonas Schnelli 1cad8c9ff9
setban: add RPCErrorCode 2017-03-02 13:23:03 -08:00
Jonas Schnelli 171b4de8d9
fix CSubNet comparison operator 2017-03-02 13:23:03 -08:00
Jonas Schnelli fcc8920f36
setban: rewrite to UniValue, allow absolute bantime 2017-03-02 13:23:03 -08:00
Jonas Schnelli 63c06b232b
rename json field "bannedtill" to "banned_until" 2017-03-02 13:23:03 -08:00
Jonas Schnelli e521939942
[RPC] extend setban to allow subnets 2017-03-02 13:23:03 -08:00
Jonas Schnelli 445cd761c5
[net] remove unused return type bool from CNode::Ban() 2017-03-02 13:23:03 -08:00
Jonas Schnelli 962ec4b5e4
[QA] add setban/listbanned/clearbanned tests 2017-03-02 13:23:03 -08:00
Jonas Schnelli ed3f13a057
[RPC] add setban/listbanned/clearbanned RPC commands 2017-03-02 13:23:03 -08:00
Jonas Schnelli 997829713c
[net] extend core functionallity for ban/unban/listban 2017-03-02 13:23:03 -08:00
Alex van der Peet 94ee48c42a
New RPC command disconnectnode 2017-03-02 13:23:03 -08:00
Stephen 6699b42518
Add paytxfee to getwalletinfo, warnings to getnetworkinfo 2017-03-02 13:23:03 -08:00
Daniel Kraft e940185294
Fix univalue handling of \u0000 characters.
Univalue's parsing of \u escape sequences did not handle NUL characters
correctly.  They were, effectively, dropped.  The extended test-case
fails with the old code, and is fixed with this patch.
2017-03-02 13:23:03 -08:00
zkbot 28a5393401 Auto merge of #2138 - daira:2137.compactsize-portability.0, r=arcalinea
Don't assume sizes of unsigned short and unsigned int in GetSizeOfCompactSize and WriteCompactSize.

Fixes #2137

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-02 21:07:20 +00:00
zkbot b75b2de004 Auto merge of #2124 - str4d:2086-help2man, r=str4d
Improve autogenerated manpages

Cherry-picked from bitcoin/bitcoin#8608.

Closes #2086.
2017-03-02 19:20:10 +00:00
Jack Grigg 633787060a
Update release process with gen-manpages.sh 2017-03-02 11:18:47 -08:00
Jack Grigg 1f5cc3fa74
Regenerate and collate Zcash manpages, delete Bitcoin ones 2017-03-02 11:18:46 -08:00
Jack Grigg a0e6d5a185
Adjust gen-manpages.sh for Zcash, use in Debian builds 2017-03-02 11:18:44 -08:00
nomnombtc 076406650c
improved gen-manpages.sh, includes bitcoin-tx and strips commit tag, now also runs binaries from build dir by default, added variables for more control 2017-03-02 11:18:43 -08:00
nomnombtc 4a558b2bea
regenerated all manpages with commit tag stripped, also add bitcoin-tx 2017-03-02 11:18:42 -08:00
nomnombtc 1b5e712c72
change help string --enable-man to --disable-man 2017-03-02 11:18:40 -08:00
nomnombtc abfcaefe3d
add conditional for --enable-man, default is yes 2017-03-02 11:18:22 -08:00
zkbot 6ee75b3b7b Auto merge of #2014 - arcalinea:test-prioritisetransaction, r=arcalinea
Test prioritisetransaction

After talking with @str4d about #1884 , I wrote a test for prioritisetransaction. It uses small blocks (11kb), and checks whether a transaction makes it into the next block after being prioritized by that node.

Should this be improved with a larger number of txs in the mempool, or by testing over multiple runs?

As for getblocktemplate(), it seems to return the prioritized transaction within the block size set by the node (about 50 txs fit in an 11kb block), but the block "sizelimit" it displays is set at 2 MB in `rpcmining.cpp` line 690:
```
result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_SIZE));
```

This was quite confusing, I didn't think the `-blockmaxsize` parameter I was setting was working for awhile.
2017-03-02 06:47:04 +00:00
zkbot 14711a4a43 Auto merge of #2141 - bitcartel:1969_free_rate_limiter, r=daira
Closes #1969. Large shielded transactions using the default fee are no longer treated as "free" transactions
2017-03-02 03:51:14 +00:00
zkbot c1cff6069f Auto merge of #2130 - str4d:2095-metrics-reindex-msg, r=arcalinea
Do not ask a UI question on metrics screen

Based on bitcoin/bitcoin#8257.

Closes #2095.
2017-03-02 03:08:29 +00:00
zkbot 1a41597af8 Auto merge of #2114 - bitcartel:fix_fr_test_bug_and_new_testnet_addresses, r=daira
Closes #2113. Fixes bug in test and updates testnet fr addresses.

Updating the testnet fr addresses will introduce a consensus change on testnet, so all testnet nodes will be required to upgrade.  See #2113 for more information.
2017-03-02 02:18:33 +00:00
zkbot 312fbd9d0e Auto merge of #1932 - aniemerg:1522-pause-mining-for-joinsplit, r=arcalinea
Pause mining during JoinSplit creation

Closes #1522 .
2017-03-02 01:23:44 +00:00
Allan Niemerg 49c2cecb9f Pause mining during joinsplit creation 2017-03-01 16:54:26 -08:00
zkbot 44ccf1ff20 Auto merge of #2123 - bitcartel:2112_z_getoperationresult_returns_executing_status, r=arcalinea
Closes #2112 where z_getoperationresult could return stale status.

The problem was similar to a check-then-act race condition.  Status object was obtained from an operation, which might be in an 'executing' state.  Instead of checking the state recorded in the status object, the operation was queried again to see if it was in a finished state (failed,success,cancelled) and if yes, the status object was returned to the user.  However, if the operation had changed state in the background, the status object would be stale.
2017-03-02 00:24:26 +00:00
Simon 85c9ecb846 Part of #1969. Update tests to avoid error 'absurdly high fee' from change in min fee calc. 2017-02-28 11:44:51 -08:00
Simon ebe750a882 Part of #1969. Changing min fee calculation also changes the dust threshold. 2017-02-28 11:44:07 -08:00
Simon 0f724e716d Closes #1969. Default fee now sufficient for large shielded tx.
Sets default min relay tx fee to 100, which is used to initialize
nSatoshisPerK for min fee calculation.  The default z_sendmany
fee of 10000 is now sufficient to cover a tx of size 100000 bytes,
so txs will not be treated as "free" and hit the free rate limiter.
2017-02-28 11:43:04 -08:00
zkbot 6f5d8fbe81 Auto merge of #2126 - bitcartel:checkpoint_mainnet_67500, r=daira
Add checkpoint at block 67500 (mainnet)

Close #2125
2017-02-28 01:01:56 +00:00
zkbot 98ddf87d18 Auto merge of #2128 - bitcartel:checkpoint_testnet_38000, r=daira
Add checkpoint at block 38000 (testnet)

Closes #2127
2017-02-28 00:12:04 +00:00
Jay Graber 8d2dac6e3f Inc num of txs in test mempool 2017-02-27 14:11:09 -08:00
Daira Hopwood d76ed723c5 Don't assume sizes of unsigned short and unsigned int in GetSizeOfCompactSize and WriteCompactSize.
Fixes #2137

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-02-27 19:34:23 +00:00
Jack Grigg 0cd769fbb7
Treat metrics screen as non-interactive for now
Closes #2095
2017-02-23 12:55:14 +00:00
Jack Grigg f42cde3c30
Remove reference to -reindex-chainstate
Revert this when bitcoin/bitcoin#7917 is merged.
2017-02-23 12:42:28 +00:00
Pieter Wuille 5d66d0a11e
Do not ask a UI question from bitcoind 2017-02-23 12:40:45 +00:00
Simon 5a888f7294 Add testnet checkpoint at block 38000 2017-02-22 22:34:20 -08:00