-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #252: Reproduce Bitcoin Core's handling of cookie files
b16f7ef Reproduce Bitcoin Core's handling of cookie files (Casey Rodarmor) Pull request description: I was running into an confusing issue where a cookie file that worked with `bitcoin-cli` wasn't working with rust-bitcoincore-rpc. It turned out that the cookie file contained a newline, which Bitcoin Core ignored but `rust-bitcoincore-rpc` included as part of the password. This PR reproduces the behavior of Bitcoin Core, so that all cookie files that with Bitcoin Core should work with `rust-bitcoincore-rpc`. The commit message: Bitcoin Core uses a single call to std::getline to read the contents of cookie files, making it ignore newlines in the file, as well as ignore any lines after the first. This reproduces that behavior, so that all cookie files that work with Bitcoin Core should work with this library. ACKs for top commit: RCasatta: utACK b16f7ef Tree-SHA512: d3d2a0d6d526bbeb905e4dec5ebd2c03a2ca20bd8a06f7336aacc149d6c44c41dee908e702951d21806a33c84c227f37bdce524677b432963b0266950faf467c
- Loading branch information
Showing
3 changed files
with
41 additions
and
10 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -28,3 +28,6 @@ jsonrpc = "0.14.0" | |
serde = "1" | ||
serde_json = "1" | ||
bitcoin-private = "0.1.0" | ||
|
||
[dev-dependencies] | ||
tempfile = "3.3.0" |
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
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