btcsuite / btcd

An alternative full node bitcoin implementation written in Go (golang)
https://github.com/btcsuite/btcd/blob/master/README.md
ISC License
6.2k stars 2.36k forks source link

Add address field (rpc client & server) #1969

Closed lindlof closed 1 year ago

lindlof commented 1 year ago

Bitcoin Core has added address field and removed addresses and reqSigs rpc response fields. The fields were deprecated on version 22 and they've been removed from version 23. For instance, the following methods are affected:

This PR adds the new address and deprecates the removed fields.

Closes #1874

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 5193275574


Changes Missing Coverage Covered Lines Changed/Added Lines %
rpcserver.go 0 15 0.0%
<!-- Total: 0 15 0.0% -->
Files with Coverage Reduction New Missed Lines %
rpcserver.go 3 0.26%
peer/peer.go 7 73.2%
<!-- Total: 10 -->
Totals Coverage Status
Change from base Build 5075515644: -0.02%
Covered Lines: 26665
Relevant Lines: 48261

💛 - Coveralls
bog-h commented 1 year ago

PR looks fine! I wanted to open a similar PR because we now receive the address field from the node and don't have it in the result.

lindlof commented 1 year ago

Okay @guggero I've left the deprecated fields in. The commit to remove them exists in https://github.com/lindlof/btcd/commit/faae23164d635ea6145f2108a96d4673e2811fc3

ygaberman-px commented 1 year ago

@guggero @bog-h is there anything preventing from merging this in? This would be really helpful for me

guggero commented 1 year ago

I guess another review from someone who has more experience with the code base than myself would be great. Any volunteers, @Roasbeef, @kcalvinalvin, @chappjc?

kcalvinalvin commented 1 year ago

ACK fcf291947d51896664e848526482983a5cbb72db26fa1d78649c3d051cf602fc

Also tested by calling getrawtransaction, decoderawtransaction, and gettxout to a Bitcoin Core node. Works well.