Commit graph

3525 commits

Author SHA1 Message Date
tpkeeper
8512affc59 readme: remove duplicate word 2020-05-06 08:32:44 -04:00
Dan Cline
8b54b0b964 config.go: remove extra quotes 2020-04-14 06:40:20 -05:00
Murray Nesbitt
9f15a7e6af Alphabetize --help output; add missing options to doc.go 2020-04-14 05:09:43 -05:00
Torkel Rogstad
57d44d022e Try both TX serialization formats 2020-03-27 16:59:23 -04:00
Iskander Sharipov
08b8751559 cmd/btcctl: use regexp.MustCompile for constant patterns
Found using https://go-critic.github.io/overview#regexpMust-ref
2020-03-26 09:54:27 -04:00
Ivan Kuznetsov
cfcf4fb762 Implement 'getblockstats' JSON-RPC command 2020-03-25 05:51:42 -04:00
Torkel Rogstad
8b1be46463 Add generatetoaddress and estimatesmartfee RPCs 2020-03-17 09:29:41 -04:00
Jake Sylvestre
a8eadd2ce4 update GetMempoolEntryResult to v0.19.0
https://bitcoincore.org/en/doc/0.19.0/rpc/blockchain/getmempoolentry/
2020-03-16 10:26:15 -04:00
Iskander Sharipov
d9ce6b037f btcjson,rpcclient: use proper Deprecated comment format
This makes godoc and other Go tools understand deprecation notice.

Found using https://go-critic.github.io/overview#deprecatedComment-ref
2020-03-10 11:00:24 -04:00
Jake Sylvestre
c4f39996ac
Refactor GetBlockVerboseTx to reflect correct getblock RPC call… (#1529)
Refactor GetBlockVerboseResult into two separate types: one type for getblock "hash" verbosity=1,
and a second type for getblock "hash" verbosity=2. This is necessary due to how getblock returns
a block's transaction data based on the provided verbosity parameter.

If verbosity=1, then getblock.Tx is an array of a block's transaction ids (txids) as strings.
If verbosity=2, then getblock.Tx is an array of raw transaction data.

Due to differences in how getblock returns data based on the provided verbosity parameter, it's necessary
to have two separate return types based on verbosity. This necessitates a separate unmarshalling function
(represented throughout rpcclient/chain.go as Result.Receive()) to ensure that data is correctly unmarshalled
and returned to the user.
2020-03-09 14:47:11 -04:00
Daniel McNally
fd0921b9b4 btcjson: add RPC_IN_WARMUP error code
This adds an error code for the `RPC_IN_WARMUP` error code defined at
https://github.com/bitcoin/bitcoin/blob/master/src/rpc/protocol.h#L49
which is thrown when bitcoind has started but has not yet finished
verifying recent blocks and being ready for rpc calls.
2020-03-09 13:43:01 -04:00
Jin
96f3808dc9 BUG:dynamicbanscore deadlock 2020-03-09 13:41:13 -04:00
Steven Roose
9e94ccbd0e server: Fix incorrect log message format 2020-03-05 17:00:45 -05:00
Tyler Chambers
1d0bfca5b0 fix error message 2020-03-05 16:51:41 -05:00
John C. Vernaleo
e9f15eda7e
rpcclient: Add net params to Client (#1467)
* rpcclient: replace futures mainnet with params

Adds a chaincfg.Params to the Client

rpcclient: parse config to assign params

* rpcclient: change address commands to Address

 * Change address future struct to contain a network field, so futures
   can return the correct type for Receive
2020-03-05 16:46:29 -05:00
jalavosus
a310aa6e74 All tests pass 2020-03-05 06:48:26 -05:00
jalavosus
57cb8e4b11 Refactor FutureGetBlockVerboseResult into two types: FutureGetBlockVerboseResult, and FutureGetBlockVerboseTxResult.
Due to differences in how getblock returns data based on the provided verbosity parameter, it's necessary
to have two separate return types based on verbosity. This necessitates a separate unmarshalling function
(represented throughout rpcclient/chain.go as Result.Receive()) to ensure that data is correctly unmarshalled
and returned to the user.
2020-03-05 06:48:19 -05:00
jalavosus
468154a052 Refactor GetBlockVerboseResult into two separate types: one type for getblock "hash" verbosity=1,
and a second type for getblock "hash" verbosity=2. This is necessary due to how getblock returns
a block's transaction data based on the provided verbosity parameter.

If verbosity=1, then getblock.Tx is an array of a block's transaction ids (txids) as strings.
If verbosity=2, then getblock.Tx is an array of raw transaction data.
2020-03-05 06:47:38 -05:00
jalavosus
160c388285 Refactor GetBlockCmd type and NewGetBlockCmd() function to follow the bitcoin json RPC verbosity format for getblock,
which uses 0, 1, or 2 as parameters rather than a boolean true or false.
2020-03-05 06:47:38 -05:00
Kulpreet Singh
06e5c43499 Add note about using gencerts when listening on specific interfaces 2020-03-04 10:10:03 -05:00
mohanson
e2c08cc80b docs/json_rpc_api: update go examples 2020-03-04 10:06:41 -05:00
qshuai
ef4cecf42b blockchain/indexers: Start a new line for long code 2020-03-04 09:42:00 -05:00
shuai.qi
46461dc84a btcjson, rpclient: Fix typo 2020-03-04 09:23:11 -05:00
Yash Bhutwala
318c89dfed fix comment of database.Tx to match code 2020-03-04 09:21:27 -05:00
Nisen
0c76fbd26f Fix comment error 2020-03-04 08:40:20 -05:00
George Tankersley
8bbbe98be9 peer: fix small typo 2020-03-04 08:38:26 -05:00
Henry Harder
1639d6c070 release: add missing back tick in build docs 2020-03-04 08:16:36 -05:00
Federico Bond
3eb4739b75 Fix minRelayTxFee name in comment 2020-03-03 15:45:34 -05:00
Jake Sylvestre
eed57cdcf1 go fmt 2020-03-03 15:34:38 -05:00
John C. Vernaleo
c01c98159b
Merge pull request #1537 from jakesyl/patch-1
Remove $GOPATH Caching
2020-03-03 10:08:31 -05:00
Jake
6799104157
Remove $GOPATH Caching
$GOPATH caching has led to flaky tests as per #1503 and #1536. The speedup is marginal and while the false negatives are a headache, false positives are potentially dangerous.
2020-02-10 14:16:11 -05:00
Olaoluwa Osuntokun
f3ec13030e
btcd: bump version to v0.20.1-beta 2019-11-12 18:27:49 -08:00
Olaoluwa Osuntokun
037489ef50
Merge pull request #1485 from wpaulino/syncmanager-done-peer-verack
server: remove peer from SyncManager on VerAckReceived
2019-11-08 18:21:37 -08:00
Olaoluwa Osuntokun
79943b2331
Merge pull request #1488 from Crypt-iQ/server_race_1108
server: add addressesMtx to fix race condition
2019-11-08 18:21:10 -08:00
Olaoluwa Osuntokun
4eac390191
Merge pull request #1484 from wpaulino/bitcoind-0.19-compat
btcjson+rpcclient: add compatibility for bitcoind v0.19.0
2019-11-08 18:19:43 -08:00
nsa
c2ca0a408e
server: add addressesMtx to fix race condition 2019-11-08 21:11:24 -05:00
Wilmer Paulino
e2e5cc694d
btcjson+rpcclient: support new bitcoind sendrawtransaction request 2019-11-08 17:53:46 -08:00
Wilmer Paulino
93a84aa014
btcjson: use correct json tag for Bip9SoftForkDescription.StartTime 2019-11-08 17:53:45 -08:00
Wilmer Paulino
266851e329
btcjson+rpcclient: support new unified softfork bitcoind format 2019-11-05 16:28:33 -08:00
Wilmer Paulino
e89d4fca24
rpcclient: allow retrieval of backend version 2019-11-04 17:44:29 -08:00
Wilmer Paulino
bc21593480
server: remove peer from SyncManager on VerAckReceived
Peers are now added to the SyncManager if we receive their verack, but
we'd still attempt to remove them from the SyncManager if we didn't
receive it.
2019-10-29 19:38:38 -07:00
Wilmer Paulino
a46f7b45ab
rpcclient: add GetNetworkInfo method 2019-10-29 18:49:37 -07:00
Olaoluwa Osuntokun
a41498d578
release: remove windows-arm 2019-10-15 10:11:03 +02:00
Olaoluwa Osuntokun
2fb0deccfd
Merge pull request #1478 from Roasbeef/release-0.20.0
btcd: prep for upcoming btcd release
2019-10-14 17:36:16 +02:00
Olaoluwa Osuntokun
860ca32a22
Merge pull request #1480 from wpaulino/add-peer-on-verack
server: refactor OnVersion to instead add peers within OnVerAck
2019-10-14 17:11:47 +02:00
Wilmer Paulino
baeb789a7d
server: prevent adding peers if already disconnected
This addresses an issue where the server ends up tracking a peer that
has been disconnected due to it processing a peer's `done` message
before its `add` message.
2019-10-14 13:26:44 +02:00
Wilmer Paulino
769c4e152f
server: request addresses from new peers once they can process messages
This was previously done within the OnVersion listener, which should not
be a blocking operation. It turns out that requesting these messages
there can lead to blocking due to peers not being able to process
messages since their message queues have yet to start. Therefore, we'll
now request within handleAddPeerMsg, which should allow it to go
through.
2019-10-14 13:26:43 +02:00
Wilmer Paulino
a1a5bfa819
server: add new peers within OnVerAck instead of within OnVersion
This change is needed as part of requiring peers to also send a verack
message following their version message during protocol negotiation.
Peers were previously added to the SyncManager before their message
queues were started, causing the server to stall if a peer didn't
provide a timely verack response following their version. We now do this
within OnVerAck, which happens shortly before peer message queues are
started.
2019-10-14 13:26:42 +02:00
Wilmer Paulino
11b84f5cb5
server: signal SyncManager with new peer within AddPeer
This makes the logic a bit more unified as previously it was possible we
for us to report the new peer to the SyncManager, but for whatever
reason failed to track the peer in the server internally within AddPeer.
This change ensures this can no longer happen.
2019-10-14 13:26:16 +02:00
Olaoluwa Osuntokun
07282a6656
Merge pull request #1477 from wpaulino/conn-fixes
server: miscellaneous connection management fixes
2019-10-11 16:14:09 -07:00