-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e70a0fe
commit fd4343d
Showing
10 changed files
with
6,418 additions
and
143 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
# Generate the protos. | ||
protoc -I/usr/local/include -I. \ | ||
-I$GOPATH/src \ | ||
--go_out=plugins=grpc:. \ | ||
btcrpc.proto | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package btcrpc | ||
|
||
import "github.com/btcsuite/btcd/chaincfg/chainhash" | ||
|
||
// NewBlockLocatorHash creates a new BlockLocator using the given block hash. | ||
func NewBlockLocatorHash(hash *chainhash.Hash) *BlockLocator { | ||
return &BlockLocator{ | ||
Locator: &BlockLocator_Hash{ | ||
Hash: hash[:], | ||
}, | ||
} | ||
} | ||
|
||
// NewBlockLocatorHeight creates a new BlockLocator using the given block height. | ||
func NewBlockLocatorHeight(height int32) *BlockLocator { | ||
return &BlockLocator{ | ||
Locator: &BlockLocator_Height{ | ||
Height: height, | ||
}, | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
|
||
|
||
All current methods and the new methods that cover them: | ||
|
||
- [x] addnode: ConnectPeer | ||
- [x] createrawtransaction: deprecated | ||
- [x] debuglevel: SetDebugLevel | ||
- [x] decoderawtransaction: deprecated | ||
- [x] decodescript: deprecated | ||
- [x] generate: GenerateBlocks | ||
- [x] getaddednodeinfo: GetPeers | ||
- [x] getbestblock: GetBestBlockInfo | ||
- [x] getbestblockhash: GetBestBlockInfo | ||
- [x] getblock: GetBlock | ||
- [ ] **getblockchaininfo: could add to GetNetworkInfo** | ||
- [x] getblockcount: GetBestBlockInfo | ||
- [x] getblockhash: GetBlockInfo | ||
- [x] getblockheader: GetBlockInfo | ||
- [ ] **getblocktemplate** | ||
- [x] getconnectioncount: GetSystemInfo | ||
- [x] getcurrentnet: GetNetworkInfo | ||
- [x] getdifficulty: GetNetworkInfo or GetMiningInfo | ||
- [x] getgenerate: GetGenerate | ||
- [x] gethashespersec: GetHashRate (or GetNetworkInfo or GetMiningInfo for network HR) | ||
- [ ] **getheaders** | ||
- [x] getinfo: GetSystemInfo and GetNetworkInfo | ||
- [x] getmempoolinfo: GetMempoolInfo | ||
- [x] getmininginfo: GetMiningInfo | ||
- [x] getnettotals: GetSystemInfo | ||
- [x] getnetworkhashps: GetNetworkInfo or GetMiningInfo | ||
- [x] getpeerinfo: GetPeers | ||
- [x] getrawmempool: GetMempool and GetRawMempool | ||
- [x] getrawtransaction: GetRawTransactions | ||
- [ ] **gettxout** | ||
- [x] help: deprecated | ||
- [x] node: ConnectPeer, DisconnectPeer, GetPeers | ||
- [x] ping: deprecated | ||
- [ ] **searchrawtransactions: how is this different than rescan?** | ||
- [x] sendrawtransaction: SubmitTransactions | ||
- [x] setgenerate: SetGenerate | ||
- [x] stop: StopDaemon | ||
- [x] submitblock: SubmitBlock | ||
- [x] uptime: GetSystemInfoo | ||
- [x] validateaddress: deprecated | ||
- [ ] **verifychain** | ||
- [ ] **verifymessage** | ||
- [x] version: GetSystemInfo | ||
|
||
There are WebSocket-only commands: | ||
- [x] loadtxfilter | ||
- [x] notifyblocks: SubscsribeBlocks | ||
- [x] notifynewtransactions: SubscribeTransactions | ||
- [x] notifyreceived: potentially SubscribeTransactions | ||
- [x] notifyspent: potentially SubscribeTransactions | ||
- [x] rescan: RescanTransactions | ||
- [ ] **rescanblocks: why is this useful?** | ||
- [x] session: deprecated | ||
- [x] stopnotifyblocks: SubscribeBlocks | ||
- [x] stopnotifynewtransactions: SubscribeTransaction | ||
- [x] stopnotifyspent: potentially SubscribeTransaction | ||
- [x] stopnotifyreceived: potentially SubscribeTransaction | ||
|
||
These are mentioned in the code as not implemented, but desired: | ||
- estimatefee | ||
- estimatepriority | ||
- getchaintips | ||
- getmempoolentry | ||
- getnetworkinfo: GetNetworkInfo | ||
- getwork | ||
- invalidateblock | ||
- preciousblock | ||
- reconsiderblock | ||
|
||
Other TODOs: | ||
|
||
- [x] implement listening | ||
- [ ] add GRPC dependenies (waiting for dep PR) | ||
- [ ] correct error handling | ||
- [ ] REST proxy? (cfr lnd) |
Oops, something went wrong.